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.
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.
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;