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.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.