The SAS Output Delivery System and reporting techniques

Proc report ODS RTF _Header Display with N=n

Reply
N/A
Posts: 0

Proc report ODS RTF _Header Display with N=n

I want the header to be displayed in proc report with RTF option to look like this;

Placebo (N=n) SB-509 (N=n)
Mild Moderate Severe Mild Moderate Severe


I am using the following syntax for column in proc report. &var3 macro corresponds to (N=n). Everything except the (N=n) is getting displayed properly, because I assume the '^R/RTF doesnot recognize the macro variable &var3. Is their a way to get around this?



columns PLAN P1 PT_NM ('^R/RTF"\brdrb\brdrs\brdrw1" Placebo (&var3) |' MILD MODERATE SEVERE) EMPTY ('^R/RTF"\brdrb\brdrs\brdrw1" SB-509 (&var2)|' MILD MODERATE SEVERE) ;
SAS Super FREQ
Posts: 8,745

Re: Proc report ODS RTF _Header Display with N=n

Hi:
Try putting the RTF "raw" text in single quotes and that will allow you to put your macro variable reference inside double quotes -- so it can resolve. A macro variable won't resolve if surrounded by single quotes. I just used SASHELP.CLASS for the report and STYLE=JOURNAL for the style.

cynthia
[pre]
%let var3 = %str(N=5);
%let var2 = %str(N=5);

ods listing close;
ods rtf file='trybrdrb.rtf' style=journal;
ods escapechar='^';

proc report data=sashelp.class(obs=5) nowd;
columns name
("^R/RTF'\brdrb\brdrs\brdrw1' Placebo (&var3) " height weight)
("^R/RTF'\brdrb\brdrs\brdrw1' SB-509 (&var2)" sex age) ;
run;
ods rtf close;
[/pre]
N/A
Posts: 0

Re: Proc report ODS RTF _Header Display with N=n

Thanks for the help.

I figured that out after posting my question.

Thanks again for the help.
Ask a Question
Discussion stats
  • 2 replies
  • 3031 views
  • 0 likes
  • 2 in conversation