The SAS Output Delivery System and reporting techniques

ODS PDF Reports in single page with respective titles

Reply
N/A
Posts: 1

ODS PDF Reports in single page with respective titles


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

Super User
Posts: 17,963

Re: ODS PDF Reports in single page with respective titles

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;

Ask a Question
Discussion stats
  • 1 reply
  • 1100 views
  • 0 likes
  • 2 in conversation