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
SAS Super FREQ

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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