BookmarkSubscribeRSS Feed
zhangda
Fluorite | Level 6

Hello all!

 

I am coding a book cover and a table of contents with ods pdf file, but why there is a small box on the top writing' Continuing contents of page 2, which would not fit on a single physical page' appearing on the second page next to book cover page? How could I remove it?

 

Thank you so much!

 

My code is as below,


ods pdf file="/C/test3.pdf" notoc;


title1 j=c color=black HEIGHT=150pt BOLD " ";


title2 j=c color=black HEIGHT=35pt BOLD "Apido Company ";

title3 j=c color=black HEIGHT=35pt BOLD " Month End Reporting Package ";
title4 j=c color=black HEIGHT=280pt BOLD " ";

title5 j=c color=black HEIGHT=18pt BOLD "Data as of &yesterday. ";

title6 j=c color=black HEIGHT=148pt BOLD " ";
title7 j=left color=black HEIGHT=26pt BOLD "";

/* Workaround code starts here */
ods pdf startpage=now;

proc report nowd data=sashelp.class(obs=1)
noheader style(report)={rules=none frame=void}
style(column)={foreground=white};
run;

ods pdf startpage=no;

ods pdf text = '^S={ foreground=black fontweight=bold just=left font_size=28pt} Table of Contents';
ods pdf text = '^S={ foreground=black fontweight=bold just=left font_size=28pt} ';
ods pdf text = '^S={ foreground=black fontweight=bold just=left font_size=16pt} CQ Metrics ...........................................................................Page 2';


ods pdf close;

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I tend to put page breaks specifically in the data and break on those rather than leaving default behaviour.  If you data is simple then you can just do:

data have;
  set have;
  pge=floor(_n_ / <numobsperpage>) + 1;
run;

proc report ...
  define pge / order noprint;
  break on pge / page;
run;

Obviously if your data is more complex then the page calculation will mirror this.

zhangda
Fluorite | Level 6

Hi, 

 

Would you please give me the specific code? because I cannot run your code successfully, lots of errors. Thanks!

RW9
Diamond | Level 26 RW9
Diamond | Level 26

This is an only and example showing a couple of the lines needed (i.e. the datastep algorithm to derive a variable called pge and the additional lines for the proc report step).  You will need to modify to fit your process.  

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1510 views
  • 0 likes
  • 2 in conversation