BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KatjaG
Fluorite | Level 6

When I re-arrange ODS Document entries to get a flat navigation pane, then the auto generated TOC by SAS does link the wrong page. 

 

Background: I have a BY-Statement PROC REPORT and do not want to have the single BY groups linked. For this I shift the two reports one level higher in ODS Document. I get the desired navigation in PDF and the TOC is looking correct, but when I click "Table 2" in the TOC is goes to the last page of "Table 1".

 

Question: Why is the TOC linking incorrect and is there a way to change this without using a manual TOC where I need to calculate all page numbers manually?

 

Condition: The BY-Statement in PROC REPORT is a must and cannot be omitted.

 

The example program is attached. This program is creating this issue in the University Edition.

1 ACCEPTED SOLUTION

Accepted Solutions
KatjaG
Fluorite | Level 6

As no one seems to have an idea it seems to be a SAS bug, so I will bring this topic to the SAS Support.

View solution in original post

7 REPLIES 7
ballardw
Super User

Please define what you mean by "links to incorrect page".

 

When I run your code the TOC entry for By groups links to the first by group table. Is that not what you expect? Or did you want the by group tables to be the second entry with the tables after the full table?

 

Thank you for using a SASHELP data set for the example by the way.

KatjaG
Fluorite | Level 6

Thanks Ballardw for looking into the issue. When you run the complete source including the ODS Document modification, you will see the from me expected navigation and TOC:

KatjaG_1-1610736246954.png

 

If you now click on the TOC "Table 2", then it will bring you to page 2 (actual page 3) where the second BY group is located and not to the correct "Table 2" page: 

 

KatjaG_2-1610736300198.png

 

If you click the navigation on the left pane it will link to the correct page.

 

ballardw
Super User

May be another issue. I did run your code as posted.

Clicking in the table of contents page itself doesn't take me anywhere. That could be my SAS version, which is 9.4 release 4, my particular Adobe Reader version or something else entirely.

 

I'm not an expert on PDF and seldom use them so haven't delved into many details. Maybe someone else will have a better handle.

KatjaG
Fluorite | Level 6

As no one seems to have an idea it seems to be a SAS bug, so I will bring this topic to the SAS Support.

_Jaus
Calcite | Level 5
Did you ever find a solution to this? I am having the exact same issue.
KatjaG
Fluorite | Level 6

I am using a workaround to use single ODS Documents instead of one big ODS document. Another workaround would be to create the TOC manually as described here: https://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S125.pdf 

 

I have created an open source macro to perform ODS Document combining into PDFs, you might want to checkout here:

https://katjaglassconsulting.github.io/SMILE-SmartSASMacros/test_smile_ods_document_flat_label/

 

Examples are also available in the corresponding GitHub site (https://github.com/KatjaGlassConsulting/SMILE-SmartSASMacros/).

_Jaus
Calcite | Level 5
Fantastic! Thank you so much!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 7 replies
  • 1223 views
  • 1 like
  • 3 in conversation