Hi,
I am not able to print titles to second proc print in same pdf. In the Result Viewer they are but not in the pdf?!?!
I used this code:
data first1;
input patient num1 num2;
cards ;
1 22 33
1 33 44
2 55 66
run;
ods pdf file="C:\Temp\Patient1and2.pdf" startpage=no notoc ;
title1 "Title 1";
title2 "Title 2";
proc print data=first1 noobs label;
where patient = 1;
var patient num1 num2;
run;
title1 "Title 1 modified";
title2 "Title 2 modified";
proc print data=first1 noobs label;
where patient = 2;
var patient num1 num2;
run;
ods pdf close;
Any idea why titles (both original and modified) are left out from pdf?
Titles are associated with the top of the page. If you want to insert text between 2 tables on the same page, use the ODS TEXT statement.
As far as I knw=ow, and can't check this, you can only have one set of titles/footnotes per page. You could try putting the two outputs on separate pages, using ods text= to display other text before the second output. The reason being is that text above the second output isn't cosidereda title - which can only be at the top of the page. For your given example, you may find it better to do something like:
ods pdf file=... proc report data=first1 nowd; columns...; by patient; title "Patient: #byvar1"; title2 "Abc"; define...; run; ods pdf close;
Titles are associated with the top of the page. If you want to insert text between 2 tables on the same page, use the ODS TEXT statement.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.