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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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