BookmarkSubscribeRSS Feed
Kevin_Viel
Obsidian | Level 7

The header of the document that I am trying to create has a table in the header.  I will leave the complicating issue that it has varying number of columns per row.  Is creating a header in an RTF file created by ODS that is a table possible?  I have created headers using the TITLE statements.

 

My next best guess is compute page numbers and use a COMPUTE BLOCK before page, but it is already complex.

 

Thank you,

 

Kevin

 

 

3 REPLIES 3
ballardw
Super User

I it will help us help you if you provide an example of the "table" that must go in the header.

 

Note that there are things like the LASTPAGE inline function to insert page numbers, look in the documentation under Escapechar for examples using Title or Footnote statements to place page numbers.

Kevin_Viel
Obsidian | Level 7

Thank you for your response.

 

The table is rather generic, except for the first row being two, not three columns.  I think that I can deal with this, if I can somehow make this table the header or the first element of a page.  With the exception of the page numbering, it is static so I could just make an image and use the style element in the TITLE statement worse comes to worse.

 

ImageThis cell is merged with the one on its left.This row is twice as high as the others.
TextTextText
TextTextPage x of y

 

Thank you,

 

Kevin

ballardw
Super User

Here is one approach to a process.

Make a document with just the information you want using your word processor. It may help to start by making an empty file as RTF. Open, make the header, SAVE AS RTF.

Now the truly ugly part. Open the RTF document in a text editor that will treat it as text. Almost certainly you will have a lot of garbage Style information. Skip past that.

Find the text you put in the header. You will be looking for a bunch of RTF tags, and which ones I can't say at the moment.

You should be able to use the SAS ODS TEXT with the RAW to send explicit copies of that text to another ODS RTF document to see if the result is as desired.

 

Or do an internet search for RTF document specification and try to write the bit from scratch. You may need this just to sort out the tags in the RTF to the ones you need as the created version will likely include lots of stuff you don't need.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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