I am trying to build a table of contents for a monthly report. The report has several sections I'd like to reference, but their length may vary from month-to-month, so I would like to make the table of contents dynamic rather than hard-coded. I tried defining variables with ^{thispage} on the appropriate pages, but it didn't reference back correctly. Is it possible to get a page number from ODS PDF ANCHOR statements instead? Thanks.
For "sections" you might try using the ODS PROCLABEL statement as a section title in the TOC.
Before the first procedure that creates output in your sections add something like:
ods proclabel "Section XXXX";
<some proc code goes here>
Thanks. I've done this, but is there anyway to get this to call the page number in a way that I could define a variable that prints the page number out?
@tburus wrote:
Thanks. I've done this, but is there anyway to get this to call the page number in a way that I could define a variable that prints the page number out?
I don't work with PDF to have a clue and gave up trying to calculate page numbers for anything 30 years ago.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.