The SAS Output Delivery System and reporting techniques

Alligning Individual column headers in proc report with .rtf ODS

Reply
N/A
Posts: 0

Alligning Individual column headers in proc report with .rtf ODS

In proc report and rtf ODS, is there a way wherein I can allign each column header (Left, Right or center). I know the style (header) gives us the option to allign all the coulmn headers, but not individual coulmn headers.

I am using the following syntax for style (header) and defining columns. I would like to left allign only the column header _NAME_ .


style(header)={BOTTOMMARGIN = 0IN cellheight=.15in font_face= "Times New Roman" font_size=9pt background=_undef_ font_weight= medium textalign=left}

columns PAGEIT PLAN PARA OR VISIT1 P CL _NAME_ ("^R/RTF'\brdrb\brdrs\brdrw1'Placebo &VAR2 |" Placebo CPLAC) EMPTY ("^R/RTF'\brdrb\brdrs\brdrw1'SB-5090 &VAR3|" _60_mg C60MG) ;
SAS Super FREQ
Posts: 8,868

Re: Alligning Individual column headers in proc report with .rtf ODS

Posted in reply to deleted_user
Hi:
STYLE(HEADER) in the PROC REPORT statement will impact ALL column headers on the report output. But you can also use STYLE(HEADER) on a DEFINE statement in order to impact just one variable's header.

In the code below, I set OUTPUTWIDTH=100% so you can see the impact of the different justification options. Note how I can justify the individual headers separately from the data cells. Also, note how HEIGHT and WEIGHT use the default header justification in the absence of any other instructions on a DEFINE statement.

cynthia
[pre]
ods listing close;
ods rtf file='c:\temp\align_hdr.rtf';

proc report data=sashelp.class nowd
style(header)={just=c}
style(report)={outputwidth=100%};
column name sex age height weight;
define name / 'The Name'
style(header)={just=r}
style(column)={just=c};
define sex / 'Gender'
style(header)={just=l}
style(column)={just=r};
define age / 'Age'
style(header)={just=r}
style(column)={just=l};
run;

ods rtf close;
[/pre]
N/A
Posts: 0

Re: Alligning Individual column headers in proc report with .rtf ODS

Posted in reply to Cynthia_sas
Thanks for the help.
Ask a Question
Discussion stats
  • 2 replies
  • 175 views
  • 0 likes
  • 2 in conversation