Hi,
I am using proc report to create report (table1.rtf). one of variable (armb_c) is expected to display as “ArmB/C”( expected output). However in my output, the “C” always goes down one line (My output). I know the “/” serve as a break in proc report. Is any way to keep the “ArmB/C” in same line? Please see detail in attached file.
Thanks
Hi there,
Yes you are correct the "/" does serve as a break. I tried it without the / and just did "or" and was able to get the output that you are attempting to create.
Here is the code that I used:
proc report data=have NOWD;
title1 "Table 1 Count of male subjects by arm";
column Male Arma armb_c;
define Male /display " Male" style=[cellwidth=4 just=c];
define ArmA /display " Arm A /(N)" style=[just=c];
define armb_c /display "Arm B or C/(N)" style=[just=c];
compute after /style=[just=l];
line "Count of male subjects by arm";
endcomp;
RUN;
Here is the location of our documentation that might be more useful: http://go.documentation.sas.com/?docsetId=proc&docsetTarget=p0bqogcics9o4xn17yvt2qjbgdpi.htm&docsetV...
Thanks,
Samantha
Thanks.
It doesn't work when I apply to really project. Let me figure out>
Thanks.
But the client prefer "B/C" not "B or C"
Have you tried the SPLIT = option on the PROC REPORT statement? Try setting it SPLIT = to something other than the default "/" so see if that gives you what you want.
Thanks for reply.
Yes, I tried, but it doesn't work out.
I figure out it works
Thanks
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.