The SAS Output Delivery System and reporting techniques

ODS RTF

Reply
New Contributor
Posts: 2

ODS RTF

I have a PROC PRINT BY xxx ID xxx that prints one set of column headers (per page) followed by the var lines grouped correctly in the SASLIST, but prints the column headers for every by group in the ODS RTF output.  How can I get the ODS RTF to only print the column headers once per page similar to the SASLIST output?

Regular Contributor
Posts: 217

Re: ODS RTF

Using the BY Statement with the NOBYLINE Option

I don't see your code so I'm not sure if your issue is with ODS or PROC PRINT.

Base SAS(R) 9.2 Procedures Guide

If you use the BY statement with the SAS system option NOBYLINE, which suppresses the BY line that normally appears in output produced with BY-group processing, PROC PRINT always starts a new page for each BY group. This behavior ensures that if you create customized BY lines by putting BY-group information in the title and suppressing the default BY lines with NOBYLINE, the information in the titles matches the report on the pages.

I've never used a proc print with ODS RTF so I am curious to learn from your issue. 

New Contributor
Posts: 2

Re: ODS RTF

The code used to work correctly in SAS 9.2, but has performed differently using SAS 9.3.   I do not want to have a new page for each BY Group using the NOBYLINE option.

PROC PRINT data=mydata;

  BY key;

  ID key;

Here is what I get based on output to SASLIST versus ODS RTF:

From SASLIST:

Heading-1    Heading-2    Heading-3

xxxxxxxxx     xxxxxxxxx     xxxxxxxx

xxxxxxxxx     xxxxxxxxx     xxxxxxxx

xxxxxxxxx     xxxxxxxxx     xxxxxxxx

xxxxxxxxx     xxxxxxxxx     xxxxxxxx   

From ODS RTF:

Heading-1     Heading-2     Heading-3

xxxxxxxxx      xxxxxxxxx      xxxxxxxxxx

xxxxxxxxx      xxxxxxxxx      xxxxxxxxxx

Heading-1     Heading-2     Heading-3

xxxxxxxxx      xxxxxxxxx      xxxxxxxxxx

xxxxxxxxx      xxxxxxxxx      xxxxxxxxxx

Super User
Posts: 9,681

Re: ODS RTF

You can put variable's names into the first obs in the table , and give it some style ,make it like a header .

Ask a Question
Discussion stats
  • 3 replies
  • 429 views
  • 0 likes
  • 3 in conversation