The SAS Output Delivery System and reporting techniques

Titles are missing from pdf

Accepted Solution Solved
Reply
Regular Learner
Posts: 1
Accepted Solution

Titles are missing from pdf

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?

 

 


Accepted Solutions
Solution
‎02-10-2016 08:30 AM
Super Contributor
Posts: 394

Re: Titles are missing 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.

View solution in original post


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 7,199

Re: Titles are missing from pdf

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;
Solution
‎02-10-2016 08:30 AM
Super Contributor
Posts: 394

Re: Titles are missing 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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 448 views
  • 2 likes
  • 3 in conversation