Hi Everyone,
I have a single dataset, based on a where condition I am dividing that dataset into multiple views and then I am printing the output in a single page as shown in the figure.
%DO Loop for Multiple conditions;
proc report data=Abc(where=(variable="&Some_condition")) style(header)=[just=c fontsize=0.15in] style(column)=[just=l fontsize=0.12in] style(REPORT)= [width=100%] nowd;
column(codeval decod);
define codeval/"Code Value" left flow width=20;
define decod/"Code Text" left flow width=20;
run;
%END;
But the width is not uniform through out. It is changing everytime. Am I missing something. Please help me out.
Base SAS(R) 9.3 Procedures Guide, Second Edition
The width= option in define statement does not apply to outputs other than traditional monospace output.
See Base SAS(R) 9.3 Procedures Guide, Second Edition
For an example of how to use
define age / style(column)=[cellwidth=1in];
define sex / style(column)=[width=10%];
styles options to specify width for other ODS destinations than monospace.
Hope this helps!
Vincent
Base SAS(R) 9.3 Procedures Guide, Second Edition
The width= option in define statement does not apply to outputs other than traditional monospace output.
See Base SAS(R) 9.3 Procedures Guide, Second Edition
For an example of how to use
define age / style(column)=[cellwidth=1in];
define sex / style(column)=[width=10%];
styles options to specify width for other ODS destinations than monospace.
Hope this helps!
Vincent
Hi Vince,
Thank You for your response. I tried giving 50% for both the variables and this is my result.
Hi Ashok,
I'm not going to lie here I'm not quite familiar with proc report. My guess however, based on the example in the second link is that if you were to set one as 50% and the total width as 100% in your proc report statement, that the leftover portion would be automatically adjusted to whatever is leftover - likely "almost 50% but there are fractions of % taken for borders and whatnot"
I suggest you try removing the width option from either define statement and if it doesn't fix it, I can try and dig more into this issue.
Vince
Hey Vince,
Thank You so much. I solved it. Actually along with those two variables, I am using a grouping variable too but I am not printing it onto the report. I think it is creating a problem. I have adjusted the width to 49.5% each and it worked.
Thanks,
Ashok
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.