BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
3 REPLIES 3
Rose_G
Calcite | Level 5
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.
Cynthia_sas
SAS Super FREQ
Hi!
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:
[pre]
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;
[/pre]

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:
http://support.sas.com/techsup/unotes/SN/008/008044.html

Good luck!
cynthia
deleted_user
Not applicable
Hello,
Thanx Rose and Cynthia. ODS RTF text= solved my problem. I didn't know this.
Thanx a lot.

Regards,
Hemanth Padmakar.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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