Proc Report ODS Format Question
I need to have the text “Header I Want In Merged Row” in a merged cell (Or new row) that spans the entire table(s) of 4 columns.
The text “Header I Want To Span Var1 and Var1” should only span the two columns Var1 and Var2.
Like this:
_______________________________________Header I Want In Merged Row________________________________
Header I want to Span Var1 and Var2 Header I want to Span Var1 and Var2
Var1 Var2 Var1 Var2
Here is the code I am using, right now the first two text lines are showing up under the 2 columns.
ods layout start columns=2;
option center;
ods region;
/* First Table */
proc report data=XXX split='*' nowd
style(header)=[backgroundcolor=#FAF3D4 foreground=Black just=center ];
column (“Header I Want In Merged Row**Header I Want To Span Var1 and Var1' Var1 Var2 ) ;
define Var1 / style(column) = {cellwidth=1.5in just=center }
style(header)= {cellwidth=1.5in just=center background=white foreground=black };
define Var2 / style(column)= {cellwidth=1.5in just=center }
style(header)= {cellwidth=1.5in just=center background=white foreground=black };
run;
/* Second Table */
ods region;
proc report data=XXX split='*' nowd
style(header)=[backgroundcolor=#FAF3D4 foreground=Black just = center ];
column ((“Header I Want In Merged Row** Header I Want To Span Var1 and Var3' Var1 Var3) ;
define Var1 / style(column) = {cellwidth=1.5in just=center }
style(header)= {cellwidth=1.5in just=center background=white foreground=black };
define Var3 / style(column)= {cellwidth=1.5in just=center }
style(header)= {cellwidth=1.5in just=center background=white foreground=black };
run;
ods layout end;
TIA..
J
Hi,
I think what you are looking for is a title before your ods layout...
I cannot test this right now but i remember using something like the below code.
ods escapechar="~";
title "~{style [ just=center] This is my title}";
Hope it helps.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: