Help using Base SAS procedures

How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

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.


pdf.JPG

Accepted Solutions
Solution
‎08-06-2013 09:49 AM
Super Contributor
Posts: 339

Re: How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Posted in reply to AshokDatti

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

View solution in original post


All Replies
Solution
‎08-06-2013 09:49 AM
Super Contributor
Posts: 339

Re: How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Posted in reply to AshokDatti

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

Occasional Contributor
Posts: 7

Re: How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Posted in reply to Vince28_Statcan

Hi Vince,

Thank You for your response. I tried giving 50% for both the variables and this is my result.

pdf2.JPG

Super Contributor
Posts: 339

Re: How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Posted in reply to AshokDatti

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

Occasional Contributor
Posts: 7

Re: How to get uniform width across tables in a report which are printed on a single page using ods pdf and proc report

Posted in reply to Vince28_Statcan

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

🔒 This topic is solved and locked.

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

Discussion stats
  • 4 replies
  • 310 views
  • 1 like
  • 2 in conversation