The SAS Output Delivery System and reporting techniques

ODS RTF multiple tables in multiple columns & rows on a single page?

Reply
Occasional Contributor
Posts: 10

ODS RTF multiple tables in multiple columns & rows on a single page?

I have a long program that creates a detailed report with multiple tables. At the very top of the program I prevent page breaks with

ODS RTF STARTPAGE=NO;

I would like the tables organized so they are in multiple columns & rows across the page i.e. the page should look like:

Table 1     Table 4     Table 7

Table 2     Table 5     Table 8

Table 3     Table 6     Table 9

I tried using ODS RTF COLUMNS=3 but that only creates multiple columns, not rows, so the page looks like this:

Table 1     Table 2     Table 3

I'm using SAS 9.2 on a Windows 7 machine with MS Office 2010

SAS Super FREQ
Posts: 8,868

Re: ODS RTF multiple tables in multiple columns & rows on a single page?

Hi:

  You may want to work with Tech Support on this. I do not believe that ODS RTF supports ODS LAYOUT. You might have to switch to ODS PDF and use ODS LAYOUT to arrange your tables next to each other in the way you describe. What COLUMNS= does is create multiple columns from your procedure output, but it will not necessarily align multiple tables the way you describe. Of course, you could change the order in which you arrange your procedure calls to impact the way they get created...in other words:

proc for table 1

proc for table 4

proc for table 7

proc for table 2

proc for table 5

proc for table 8

etc, etc

  But the best thing for you to do is open a track with Tech Support.

cynthia

Occasional Contributor
Posts: 10

Re: ODS RTF multiple tables in multiple columns & rows on a single page?

Posted in reply to Cynthia_sas

Thanks, Cynthia. I tried your suggestion of separate FREQ procedures for each table, and that did not make any difference.

The same code used to work in earlier versions of SAS; I'm currently using SAS 9.2. After some googling, it appears that in earlier versions, SAS would not insert any page breaks between procedures if ODS RTF STARTPAGE=NO was used. But in the newer versions of SAS, SAS inserts a continuous page break between procedures if ODS RTF STARTPAGE=NO is used. This may be a contributing factor. I have contacted SAS tech support about this.

And yes, it work fine if I use ODS PDF. I may have to resort to that if nothing else works.

Ask a Question
Discussion stats
  • 2 replies
  • 507 views
  • 3 likes
  • 2 in conversation