The SAS Output Delivery System and reporting techniques

title

Reply
N/A
Posts: 0

title

i had an issue with the title statement.

in a ODS output i have


ods pdf file=" html file";

title1"report title";

Proc report data=drugA ;
run;


title2 "print title";

proc print data =DrugB;
run;

ods _all_ close;


but in the output i am getting both the titles on the top of the report only....i want title1 to be at the top of report and title2 to be on top of print output.

is there any other way to get the output witht the titles in the required location.

thanks
Sid
Valued Guide
Posts: 634

Re: title

Posted in reply to deleted_user
If both titles are showing on the first step, check that there is a RUN; between the REPORT step and the second title definition.

If you want the second title to replace the first, be sure to use TITLE1 not TITLE2.

Double check the ODS destinations to make sure that you are not mixing the destination and the file extension.

The following will show only the first title for the REPORT step and both for the PRINT.
[pre]ods html file="c:\temp\twotitl.html";
ods pdf file="c:\temp\twotitl.pdf";

title1 "report title";
Proc report data=sashelp.class nowd;
run;

title2 "print title";
proc print data =sashelp.class;
run;
ods _all_ close;
N/A
Posts: 0

Re: title

Thanks for the reply
i am using ods pdf startpage=no option in between...so that i will get both the report output and print output in the same page....if i dont use that as u said i am getting them with titles in different pages.Sorry for the confusion


Thanks
Sid
Valued Guide
Posts: 634

Re: title

Posted in reply to deleted_user
With startpage=no the second title1 statement will not appear until the second physical page. If for instance the second proc spills onto a second page - as below.

Consider using the ODS PDF TEXT= option.
[pre]*ods html file="c:\temp\twotitl.html";
ods pdf file="c:\temp\twotitl.pdf";
ods pdf text='abc';
title1 "report title";
Proc report data=sashelp.class nowd;
run;
ods pdf startpage = no;
ods pdf text='def';
title1 "print title";
proc print data =sashelp.class;
run;
ods _all_ close;[/pre]
Ask a Question
Discussion stats
  • 3 replies
  • 164 views
  • 0 likes
  • 2 in conversation