SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Leo9
Quartz | Level 8

Hi All,

 

I am using following proc report code to generate an output. The "by" statement in proc report  is causing some issue for me. I want the output split by the "by" group but in the actual output when I use the code below, I see the values for by variable appearing twice in the output. First one is from the blue highlighted syntax below which appears on the left hand side and the second is from the green highlighted syntax. The one from green highlighted syntax appear little strange where it show value like this in the output as a title. I want to get rid of it . How can I achieve it ? 

Leo9_0-1729726524282.png

 

proc report data=final_&i nowd missing headskip split='~' style(report)=[width=100%];
by byvarn byvar ;
title7 j=l "#byval(byvar)";
columns page avisitn order1 order2 linelab statistic var1-var5 ;
define page / order noprint;
define avisitn / order noprint;
define order1 / order noprint;
define order2 / order noprint;
define linelab  / style(column)={just=l cellwidth=16% /*cellspacing=1.0cm*/
asis=on}
style(header)={just=l} group;
define statistic / style(column)={just=l cellwidth=16% asis=on}
style(header)={just=l} group;
define var1 / style(column)={just=c cellwidth=11% asis=on}
style(header)={just=c} flow group "(40 mg)~(N=&n1.)";
define var2 / style(column)={just=c cellwidth=11% asis=on}
style(header)={just=c} "(80 mg)~(N=&n2.)";
define var3 / style(column)={just=c cellwidth=11% asis=on}
style(header)={just=c} order "(160 mg)~(N=&n3.)";
define var4 / style(column)={just=c cellwidth=11% asis=on}
style(header)={just=c} order "(320 mg)~(N=&n4.)";
 
define var5 / style(column)={just=c cellwidth=11% asis=on}
style(header)={just=c} "Placebo~(N=&n5.)";
 
compute before page;
line ' ';
endcomp;
 
compute after order1;
line ' ';
endcomp;
 
break after page / page;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Are you asking how to not have the BY LINE produced?  Change the system option that controls that before running the PROC.

options nobyline;

 

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Are you asking how to not have the BY LINE produced?  Change the system option that controls that before running the PROC.

options nobyline;

 

Leo9
Quartz | Level 8

Thank you!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 2 replies
  • 747 views
  • 0 likes
  • 2 in conversation