ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 10095 views
  • 1 like
  • 3 in conversation