DATA Step, Macro, Functions and more

Proc report

Accepted Solution Solved
Reply
Contributor
Posts: 31
Accepted Solution

Proc report

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

 

 


Accepted Solutions
Solution
‎01-14-2018 09:42 AM
Contributor
Posts: 31

Re: Proc report

I figure out it works

Thanks

View solution in original post


All Replies
SAS Employee
Posts: 6

Re: Proc report

 

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

Contributor
Posts: 31

Re: Proc report

Thanks.

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

 

 

Contributor
Posts: 31

Re: Proc report

Thanks.

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

Super User
Posts: 4,009

Re: Proc report

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.

Contributor
Posts: 31

Re: Proc report

Thanks for reply.

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

Solution
‎01-14-2018 09:42 AM
Contributor
Posts: 31

Re: Proc report

I figure out it works

Thanks

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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