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;
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.
Hi,
Would you please give me the specific code? because I cannot run your code successfully, lots of errors. Thanks!
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.