BookmarkSubscribeRSS Feed
Alphanumeric
Obsidian | Level 7

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.

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

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;

Alphanumeric
Obsidian | Level 7

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1614 views
  • 0 likes
  • 2 in conversation