Hi:
See if this does the trick for you WITHOUT using ODS ESCAPECHAR. PROC REPORT gives you a way to produce "spanning headers" by just specifying the string you want BEFORE the variables you want the string to span. Try this code. I've included the LISTING dest version, as well, so you can see how it started:[pre]
ods listing close;
ods pdf file='c:\temp\spanhead.pdf';
proc report data=sashelp.shoes(obs=20) nowd;
column ('Something' region subsidiary) ('Something Else' product sales inventory);
run;
ods pdf close;
After chatting with the Proc Report developer we found out that if you use two strings in the column statement you will get something that might be what you want.
Cynthia's is on one line while this one is on two lines.
Let us know!
Scott
ods pdf file = "test2.pdf";
ods escapechar = "^";
options orientation=landscape;
proc report data=sashelp.class nowd;
col ("^S={just=L}This part left" "^S={just=R}this part right" name sex age height weight);
define name--weight / display;
run;
ods pdf close;
Cynthia's suggestion does what I'm after, but I'm hoping to apply that second approach (two separate strings enclosed in separate quotes) for some LINEs later in the report.
However, the 'just=' in-line style declaration doesn't seem to have any effect.
Try putting
compute after;
line "^S={just=L}This bit left" "^S={just=R}This bit right";
endcomp;
in a proc report step... or am I missing something?
TF
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.