The SAS Output Delivery System and reporting techniques

STYLE(HEADER) in RTF destination with COMPUTE BEFORE statement

Reply
Occasional Contributor
Posts: 17

STYLE(HEADER) in RTF destination with COMPUTE BEFORE statement

Good afternoon,

I have a problem with the following code, which gives me what I want in the PDF destination, but not in the RTF destination. When I specify that the top border of the header should be red, I get a red top border in the PDF file, but not in the RTF file.

If I remove the COMPUTE BEFORE _PAGE_ section, the red border appears in RTF. I tried placing the border color instructions in the COMPUTE statement, but to no avail.

What could explain this? Here is the sample code to test:

ODS RTF STYLE=JOURNAL FILE="TEST_RTF.RTF";
ODS PDF STYLE=JOURNAL FILE="TEST_PDF.PDF";
PROC REPORT DATA=SASHELP.DEMOGRAPHICS NOWD STYLE(REPORT)=[FRAME=HSIDES WIDTH=100%]
STYLE(HEADER)=[BORDERTOPCOLOR=RED];
COLUMNS REGION NAME POP;
DEFINE REGION / GROUP "This is the region column";
DEFINE NAME / DISPLAY "This is the name column";
DEFINE POP / DISPLAY "This is the population column";
COMPUTE BEFORE _PAGE_;
LINE @1 "This is HEADER line 1";
LINE @1 "This is HEADER line 2";
ENDCOMP;
COMPUTE AFTER _PAGE_;
LINE @1 "This is FOOTER line 1";
LINE @1 "This is FOOTER line 2";
ENDCOMP;
RUN;
ODS RTF CLOSE;
ODS PDF CLOSE;

Thank you in advance for your help/suggestions,

Daniel
SAS Super FREQ
Posts: 8,866

Re: STYLE(HEADER) in RTF destination with COMPUTE BEFORE statement

Hi:
I can't remember off the top of my head whether the border(top) width is different for RTF vs PDF, or whether there are destination defaults that could be impacting what you see but you could try setting bordertopwidth explicitly:
[pre]
PROC REPORT DATA=SASHELP.shoes NOWD
STYLE(REPORT)=[FRAME=HSIDES WIDTH=100%]
STYLE(HEADER)=[BORDERTOPCOLOR=RED bordertopwidth=5];
[/pre]

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 169 views
  • 0 likes
  • 2 in conversation