BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Peter_Y
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

1 REPLY 1
Cynthia_sas
SAS Super FREQ

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 3562 views
  • 0 likes
  • 2 in conversation