BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Defense
Obsidian | Level 7

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Defense
Obsidian | Level 7

I figure out it works

Thanks

View solution in original post

6 REPLIES 6
sabisw
SAS Employee

 

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

Defense
Obsidian | Level 7

Thanks.

It doesn't work when I apply to really project.  Let me figure out>

 

 

Defense
Obsidian | Level 7

Thanks.

But the client prefer "B/C"  not "B or C"

SASKiwi
PROC Star

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.

Defense
Obsidian | Level 7

Thanks for reply.

Yes, I tried, but it doesn't work out.  

Defense
Obsidian | Level 7

I figure out it works

Thanks

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1784 views
  • 2 likes
  • 3 in conversation