The SAS Output Delivery System and reporting techniques

void frame in proc report with ods rtf tagsets

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

void frame in proc report with ods rtf tagsets

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


Accepted Solutions
Solution
‎08-27-2014 05:00 PM
SAS Super FREQ
Posts: 8,647

Re: void frame in proc report with ods rtf tagsets

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;

View solution in original post


All Replies
Solution
‎08-27-2014 05:00 PM
SAS Super FREQ
Posts: 8,647

Re: void frame in proc report with ods rtf tagsets

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;

Post a Question
Discussion Stats
  • 1 reply
  • 699 views
  • 0 likes
  • 2 in conversation