Hi everyone,
I'm having a problem involving a spanning header. I want to produce a spanning header with "text1 text2" on the left side of the page, and then "text3" at the right side of the page.
Here's my COLUMNS statement:
COLUMNS ("~{style [fontstyle=italic just=l] text1} text2 ~{style [just=r] text 3}" c1 c2 c3 c4 c5);
It is left-justified, with text1 in italics and text2 in regular, but text3 follows immediately after As far as I can tell, the second JUST doesn't work. The in-line directive works (replace JUST=R with COLOR=RED and text3 turns red), but not with JUST. Is this a spanning header issue where the width of the table can't be determined in time to apply formatting?
Thanks,
Derek
Hi:
I think there are some attributes that PDF won't change in "midstream" or "mid-cell". You'd have to check with Tech Support to verify that. However, you could just split up the header so that text1 and text2 are above the first 3 columns and then text 3 is above the last 2 columns and if you split the spanning header into 2 cells, each cell can have different justification. See the attached screen shot. Program below.
If that won't work with you, then I recommend that you work with Tech Support.
cynthia
ods pdf file='c:\temp\just.pdf' style=printer notoc;
ods escapechar='~';
proc report data=sashelp.class nowd;
COLUMNS ("~{style [fontstyle=italic just=l] text1 text2}" name age sex )
("~{style [just=r] text 3}" height weight);
run;
ods pdf close;
Thank you, Cynthia. Hope y'all are safe and warm.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.