The SAS Output Delivery System and reporting techniques

Proc report ODS RTF _Header Display with N=n

Not applicable
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) ;
Posts: 9,368

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

Posted in reply to deleted_user
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.

%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) ;
ods rtf close;
Not applicable
Posts: 0

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

Posted in reply to Cynthia_sas
Thanks for the help.

I figured that out after posting my question.

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