The SAS Output Delivery System and reporting techniques

ODS PDF title functions

Reply
Occasional Contributor
Posts: 9

ODS PDF title functions

I am working with another SAS user here and she posed an interesting question about titles in ODS PDF that I have no idea how to answer or approach. We have poured through the ODS SAS books we have to no avail. The question is: can you use functions in titles similar to using them in footnotes. Her objective is to somehow get the title (well the subtitle under title3) to use "cont'd" on each subsequent page of the PDF that is created from a fairly large dataset using proc report. Thus the first page would read the title3 line and place "subtitle of report here..." and the subsequent pages would read "subtitle of report here...cont'd" for however many pages the proc report generates.

We have been using footnote functions without issues ({thispage} will drop the correct page number on the bottom of the PDF and as long as there are no graphics to interfere, the {lastpage} works even if the length of the report changes from week to week). Is there something similar to add into the titles that can also be modified to include some type of function.

SAS Super FREQ
Posts: 8,641

Re: ODS PDF title functions

Hi:

  You can only change a title at a step boundary. So, there is no function to do exactly what you want. Frequently, people will do something like what is shown below.

cynthia

ods pdf file=....;

*** title statements for first page;

  *** proc step to display "first page" title using data=bigfile(obs=45) to limit the number of obs;

run;

  

  *** change title statements to have continued;

  *** second proc step to display rest of report using data=bigfile(firstobs=46) to start at a different obs for rest of report;

run;

   

ods pdf close;

Occasional Contributor
Posts: 9

Re: ODS PDF title functions

And that is what we were actually planning, but I figured I would ask before we set out to do that. Didn't know if someone found a way yet or if there was an upcoming presentation on a new trick like this. Thanks Cynthia.

Post a Question
Discussion Stats
  • 2 replies
  • 218 views
  • 0 likes
  • 2 in conversation