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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.