How to only show table header in the first page on ODS RTF from Proc Report

Reply
Contributor
Posts: 40

How to only show table header in the first page on ODS RTF from Proc Report

Hi,

When there are more than one page in the RTF file generated by ODS for proc report, the table header will automatically appear on every page, and this can not be removed manually.

Anybody can come up with a solution to let the RTF only show the table header on the first page?

thanks,

Z

Example: I only want this table header shown on the first page:

----------------------------------------------------

variable    level   frequency  p-value

----------------------------------------------------

Contributor
Posts: 40

Re: How to only show table header in the first page on ODS RTF from Proc Report

Just want to show an example. These codes will generate a RTF file with column " Smoking", the table header "Smoking" is shown on every page. I just want it appears only on the first page. Any idea?

ods rtf file="testRTF.rtf";

proc report data=sashelp.heart(obs=100) nowd

style(report) = {cellpadding = 1.25pt cellspacing = 2pt frame = hsides rules = groups just=center};

column smoking;

define smoking/ display order=data;

run;

ods rtf close;

thanks,

Z

Super User
Posts: 11,343

Re: How to only show table header in the first page on ODS RTF from Proc Report

My first reaction is "why"? Since if a table is too wide the RTF destination will start wrapping columns you potentially end up with confusing output.

It sound like you might be better off exporting to HTML and then converting. Then you can change the property for repreating headers in the resulting table.

Contributor
Posts: 40

Re: How to only show table header in the first page on ODS RTF from Proc Report

Just want have some control on the table header. Now I cannot even delete it from the pages other than the first page.

Your suggestion is helpful but if there is a simple option available in the ODS RTF that will be cool.

thanks,

Z

Super User
Posts: 19,778

Re: How to only show table header in the first page on ODS RTF from Proc Report

My guess is this would be an option/setting in Proc Report, not ODS RTF.

For example, it exhibits the same behaviour in ODS PDF.

EDIT: You also need to post this in ODS section to get the relevant people to respond, specifically Cynthia Smiley Happy

Contributor
Posts: 40

Re: How to only show table header in the first page on ODS RTF from Proc Report

I figured ods tagsets.rtf instead of ods rtf will do the work.

thanks,

Z

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