BookmarkSubscribeRSS Feed
Arteem
Calcite | Level 5

Hi,

 

I need help for Table of content creation while combining RTF. When I created individual Tables RTF output I have used footnote statement instead line statement under proc report.  so now I have empty space between end of table and footnote (due to footnote at end of page). When I  write below code ,TOC text is printing in between empty space of table end and footnote. so it is giving incorrect page number for Table of contents.  

ods rtf text = "^S={outputwidth=100% just=l font_face='Tahoma' font_size=3.0}{\tc\fs0\cf8    &&ttl&i.}";

 As an example . Table1 TOC text is printing on previous page which is Table of content page so it is giving page 1 but Table is starting from page 2. same as Table 2 TOC text is printing between table 1 end and footnote so on TOC page for Table 2 it has page number 2 but it should be page 3. 

 

if I change footnote with line statement then footnote is printing directly under end of table and thus no empty space so each TOC text printing at top of each table and it is giving correct page number since TOC text at top of each table. in this case for Table 1 page number 2 and table 2 page number 3 and 1st page is TOC page. 

 

Can someone let me know if there is any way to correct TOC page number when footnote statement was used for footnote instead line statement. 

11 REPLIES 11
ballardw
Super User

Can you explain what each of those raw RTF codes does?

 

I am afraid that my also have to provide exactly what &&ttl&i resolves to.

Arteem
Calcite | Level 5

Thanks for your message. I work for pharma company so individual RTF output has info about drug efficacy.  each RTF has different means/freq procedure used. Also, each RTF has 5-6 lines different footnotes.  macro &&ttl&i resolves to titles of each RTF. I have 15 RTF to combines so i is 1 to 15.

ballardw
Super User

Can you generate a document like these with non-sensitive data that has this behavior and attach the document?

 

I am not quite sure that I understand the issue and need a more concrete example.

Arteem
Calcite | Level 5

Due to sensitive data, I cannot attach.  Using proc document without any issue I can combined all 15 RTF with title and footnote. but when I created TOC which is first page Where I am getting incorrect page number. That is because footnote is at bottom of page. ODS RTF text for TOC is printing between space of end of table and footnote.

 

If anyone has combined RTF where footnote is at bottom of page can you please share code.  we have used proc document replay for combining from document istore.

Tom
Super User Tom
Super User

@Arteem wrote:

Due to sensitive data, I cannot attach.  Using proc document without any issue I can combined all 15 RTF with title and footnote. but when I created TOC which is first page Where I am getting incorrect page number. That is because footnote is at bottom of page. ODS RTF text for TOC is printing between space of end of table and footnote.

 

If anyone has combined RTF where footnote is at bottom of page can you please share code.  we have used proc document replay for combining from document istore.


I do not understand why you cannot create and share something that recreates the issue without any of your sensitive information.  The individual reports could be of SASHELP.CLASS and it should still be able to demonstrate the issue you are having with the placement of the TOC (or whatever it is you are trying to describe).  I would assume you would only need about 2 or 3 reports being combined to reproduce the issue.  

Arteem
Calcite | Level 5

here I attached combined document of RTF for an example with explanation. what is the problem. 

Arteem
Calcite | Level 5

Arteem_0-1717532055874.png

 

Tom
Super User Tom
Super User

Photographs of programs are very hard to copy and edit or run.

 

It kind of sounds like you are using TITLE and FOOTNOTE statements to generate page headers and footers on your reports.  I believe in an RTF file SAS will put those into the page sections that RTF/WORD use for headers and footers.  So they are really disconnected from the body of the table.

 

How are you generating this reports?  Are you using PROC REPORT?  Couldn't you use PROC REPORT compute blocks using LINE statements to generate the table headers and footers inside the table instead?

 

Would that help with your issue?

Arteem
Calcite | Level 5

Thanks for your response. 

 

Yes, I have used footnote statement and thus issue raised.  If I changed to line statement inside proc report for footnote, then there is not any problem. I wanted to know if anyone have solution since so many other projects where client prefer footnote at bottom of page instead in body. 

ballardw
Super User

Have you tried the BODYTITLE option in the ODS RTF statement?

 

I am not going to attempt to retype that program. Plus many undefined macro variables.

 

I am also not going to look up raw RTF codes that you are inserting. I would double check as to those meanings.

 

I see a Title5. Do you have Title1 through 4 somewhere?

Arteem
Calcite | Level 5

yes title 1-4 is same header information like client name, page number delivery date information's.  let me try bodytitle statement. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 11 replies
  • 1335 views
  • 0 likes
  • 3 in conversation