BookmarkSubscribeRSS Feed
Daniel
Obsidian | Level 7
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
1 REPLY 1
Cynthia_sas
SAS Super FREQ
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

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
  • 720 views
  • 0 likes
  • 2 in conversation