Hi all:
I need to display a long table with a order variable which spans multiple pages. In order to display the value of the order variable on every page, I use tagsets.rtf with uniform option together with proc report with spanrows. The challenge is that somehow the header style (void frame) is not working properly. For example, the code below generates 2 rtf, one using rtf and one using rtf tagsets. However, rtf tagset always display header border even I set frame=void while rtf is rendered properly. Any reason why and how to fix it for rtf tagsets?
options orientation=landscape;
ods rtf file="ods_rtf.rtf" ;
ods tagsets.rtf file="ods_rtf_tagset.rtf" style=listings uniform;
ods listing close;
data class;
set sashelp.class;
run;
ods escapechar='^';
ods tagsets.rtf;
proc report nowd data=class
style(report)=[rules=none frame=void] style(header)=[background=white];
col name age sex weight height;
compute after _page_ / style={bordertopcolor=black bordertopwidth=2};
line ' ';
endcomp;
run;
ods tagsets.rtf close;
ods rtf close;
Thanks,
Peter
Hi:
Usually with rules=none and frame=void, you also need to have cellspacing=0:
proc report nowd data=class
style(report)=[rules=none frame=void cellspacing=0]
style(header)=[background=white];
The cellspacing is the amount of table background that shows "underneath" each cell. If cellspacing=0, there there is NO space for the background to show through. But, if cellspacing is bigger than 0, then the table background shows through. Try the code below to see what setting reveals the background of yellow. I changed all the colors to make it really obvious what was happening.
Cynthia
ods tagsets.rtf file='c:\temp\tr_class.rtf';
ods rtf file='c:\temp\orig_class.rtf';
proc report nowd data=sashelp.class(obs=5)
style(report)=[rules=none frame=void cellspacing=0 background=yellow]
style(header)=[background=lightgreen]
style(column)={background=pink};
title '1) cellspacing=0';
run;
proc report nowd data=sashelp.class(obs=5)
style(report)=[rules=none frame=void cellspacing=10 background=yellow]
style(header)=[background=lightgreen]
style(column)={background=pink};
title '2) cellspacing=10';
run;
ods _all_ close;
Hi:
Usually with rules=none and frame=void, you also need to have cellspacing=0:
proc report nowd data=class
style(report)=[rules=none frame=void cellspacing=0]
style(header)=[background=white];
The cellspacing is the amount of table background that shows "underneath" each cell. If cellspacing=0, there there is NO space for the background to show through. But, if cellspacing is bigger than 0, then the table background shows through. Try the code below to see what setting reveals the background of yellow. I changed all the colors to make it really obvious what was happening.
Cynthia
ods tagsets.rtf file='c:\temp\tr_class.rtf';
ods rtf file='c:\temp\orig_class.rtf';
proc report nowd data=sashelp.class(obs=5)
style(report)=[rules=none frame=void cellspacing=0 background=yellow]
style(header)=[background=lightgreen]
style(column)={background=pink};
title '1) cellspacing=0';
run;
proc report nowd data=sashelp.class(obs=5)
style(report)=[rules=none frame=void cellspacing=10 background=yellow]
style(header)=[background=lightgreen]
style(column)={background=pink};
title '2) cellspacing=10';
run;
ods _all_ close;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.