Hi all,
I am generating two reports(two procedures used) in a single page by using ods pdf as per requirement.
The reports are generated one by one in single page, but the title is coming only for first report not for second report.
sample code:
ods pdf file="/drive1/Sample_Reports.pdf" startpage=never ;
ods proclabel = "Sample Report 1" ;
title 'REPORT - 1 ';
proc print data=sashelp.class noobs contents = "" ;
where age =15;
run;
ods proclabel = "Sample Report 2" ;
title 'Report - 2';
proc print data= sashelp.class noobs contents = "";
where SEX = 'F';
run;
ods pdf close;
I got the report in a single pdf page, but the report is having a only title i.e., REPORT - 1
I need second title ('Report - 2') to be printed after end of first report and before start of second report as mentioned in code.
Could some one help me .?
Thanks,
Prakash
Titles are printed at the top of pages, you can use ODS PDF TEXT="" instead of titles if you have multiple reports on one page:
Think of the titles as headers instead of titles in this case.
ods pdf file="/drive1/Sample_Reports.pdf" startpage=never ;
ods proclabel = "Sample Report 1" ;
ods pdf text= 'REPORT - 1 ';
proc print data=sashelp.class noobs contents = "" ;
where age =15;
run;
ods proclabel = "Sample Report 2" ;
ods pdf text= 'Report - 2';
proc print data= sashelp.class noobs contents = "";
where SEX = 'F';
run;
ods pdf close;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.