The SAS Output Delivery System and reporting techniques

Page breaks in ODS RTF

Not applicable
Posts: 0

Page breaks in ODS RTF

Hello All,
I have a problem with page breaks when using ODS RTF. My aim is to put as many tables(Each table corresponds to each proc report in my code) as possible into a single page (of RTF destination), and then go to the next page.
Here are some of the approaches I used, but failed to implement.
1. I used startpage=no option and changed to startpage=now, whenever is needed. This concept worked very fine except that, it takes a single title for the two tables(two proc reports). Meaning, it takes a single title for each page. I want two different titles for the two tables.
2. I tried to use options formdlim=' '. But this seems to apply only for the output window, but not for the ODS RTF. I can see the differences in the output window, but not in RTF file.

Can anyone suggest me a solution for this.

Thanks in Advance,
N. Hemanth Padmakar.
Occasional Contributor
Posts: 14

Re: Page breaks in ODS RTF

Posted in reply to deleted_user
One thing you could do for the titles is to put them in their own proc report table (using a style with the borders removed). That way you could place them whereever you need them. This is the approach I take for all titles and footnotes because I keep them in a dataset. You could also put them before and after the page in a compute block .

Alternatively you could use ODS RTF TEXT= to put the titles between the tables.
Posts: 9,371

Re: Page breaks in ODS RTF

Posted in reply to deleted_user
Until SAS 9.2, all vertical measurement is handled by the RTF viewer (Word) when it renders the RTF file created by SAS. So you can't really code hard and fast page breaks until the new "measured" RTF is available. FORMDLIM only applies to the LISTING window.

When you use STARTPAGE=NO, the TEXT= option can be used to insert text between procedures (doesn't matter which ones). For example:
ods rtf file='c:\temp\testsp.rtf' startpage=no;
title 'First Proc';
*** first proc code;

ods rtf text='Second Proc';
*** second proc code;

ods rtf close;

The text that you write with ODS TEXT= will be initially left-justified. You can format it (center, bigger font, etc) with the techniques described here:

Good luck!
Not applicable
Posts: 0

Re: Page breaks in ODS RTF

Posted in reply to deleted_user
Thanx Rose and Cynthia. ODS RTF text= solved my problem. I didn't know this.
Thanx a lot.

Hemanth Padmakar.
Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation