The SAS Output Delivery System and reporting techniques

ODS, PROC REPORT

Reply
N/A
Posts: 0

ODS, PROC REPORT

I'm trying to create a style sheet for use with PROC REPORT to produce RTF using SAS 9.1.3.

I want my final table to have lines at the top and the bottom of the table but no lines between rows, so am using:

STYLE TABLE FROM CONTAINER /
FRAME = HSIDES
RULES = NONE;

However I do want lines between rows in the header part of the table.
Can someone please help?
SAS Employee
Posts: 22

Re: ODS, PROC REPORT

Try the following sample code:

proc template;
define style styles.test;
parent=styles.rtf;
style table from output /
frame=hsides
rules=groups;
style header from headersandfooters /
background=_undef_;
end;
run;

ods listing close;
ods rtf file='test.rtf' style=styles.test;

proc report data=sashelp.class nowd;
run;

ods listing;
ods rtf close;
N/A
Posts: 0

Re: ODS, PROC REPORT

That doesn't work.

If you change your code to:

proc report data=sashelp.class nowd;
columns ("Line one" name) sex age weight height;
run;

you should be able see what I mean.
SAS Employee
Posts: 22

Re: ODS, PROC REPORT

Try the following:

proc template;
define style styles.test;
parent=styles.rtf;
style table from output /
frame=hsides
rules=groups;
style header from headersandfooters /
background=_undef_
protectspecialchars=off;
end;
run;

ods listing close;
ods rtf file='test.rtf' style=styles.test;

proc report data=sashelp.class nowd;
columns ("\brdrb\brdrs\brdrw15 Line one" name) sex age weight height;
run;

ods listing;
ods rtf close;
N/A
Posts: 0

Re: ODS, PROC REPORT

Hi Kathryn,
That does work, but only after a fashion.
There are "gaps" between the columns. They aren't necessarily visible on screen unless you zoom in to 150%+, but are clearly visible on printed output.

Is there any way of doing this without RTF commands?
Contributor
Posts: 30

Re: ODS, PROC REPORT

Hi

\brdrb\brdrs\brdrw15 is like drawing a line in a cell. Note the cells will have a padded gap
otherwise you may run into a situation where text from one cell look as if it is continous
to the next. What you want is to draw the borders - but SAS is not able to do this at the
moment.

You can draw borders by post-processing.

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