BookmarkSubscribeRSS Feed
Barite | Level 11



I am generating a table using Proc report. My code works fine but the last column values are truncated. I increased linesize in  my code. That did not help. Where do i need to adjust to fit all the columns.


 The first OBS value parenthesis is truncated. Thank you. Please help


Last column values



102 ( 60.1

80 ( 30.0)






options nonumber noquotelenmax orientation=landscape topmargin=1in leftmargin=0.6in bottommargin=0.7in rightmargin=1in linesize=256;
ods listing close;
ods escapechar = '^';
ods rtf file="C:\Users.rtf" style=journal;
title1 justify=right 'page ^{pageof}';
title2 ";
%let s = %sysfunc(repeat(%str(_), 149 )) ;

proc report data=data center headskip nowd missing split='|'
style(report)={outputwidth=100% cellpadding=3 rules=groups frame=above}
style(header)={font_weight=bold fontsize=9pt fontstyle=ROMAN}
style(lines)={cellpadding=1 fontsize=3pt};

column tm ts ts text ("^R'\brdrb\brdrs\brdrw10 'Double-Blind Withdrawal Phase" six one two three four five);
define tm/order noprint;
define ts/order noprint;
define ts/order noprint;
define text/ "Number (%) of Subjects with" style(column)={asis=on cellspacing=.25pt just=left width=25%} style(HEADER)={JUST=l} flow;
define six/ "Placebo|N=11" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow;
define one/ "12.5 mg|N=70" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow;
define two/ "35 mg|N=19" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow;
define three/ "110 mg|N=52" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow;
define four/ "100 mg|N=12" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow ;
define five/"TT|OOO-000|N=203" style(column)={cellspacing=.25pt just=left width=8%} style(HEADER)={JUST=l} flow;

ods rtf close;

Super User

ODS destinations other than listing really don't care about line size.


How much is being truncated? If it is only a few character you might either use a Style with genearlly smaller font sizes or specify a smaller font size for just a few columns. You may also gain a little spacing by reducing the CELLPADDING style element as well as the CELLSPACING or setting specific cell width in units instead of percent.


If you are talking about losing 40 or 50 characters then you may need to do something more drastic like changing papersize or switching to landscape.

Barite | Level 11

Thank you. I got the output I need.


I have one more question. Please help.


How to prduce two tables (one after another) in one report. The tables from vendor contain first table on first two pages and second on next two pages.





Super User

Is this a case of too many columns wrapping? The options are going to be making the destination wider or the columns narrower to fit the information on one row, if I understand the problem. Possibly setting the system option PAPERSIZE will help, though if the resulting PDF is expected to actually be printed that may cause another problem later.


  You have 1 ODS RTF "Sandwich" and you put both PROC REPORTS inside that FILE= listed on the top statement.



ods rtf file="c:\temp\both_reports_one_file.rtf";
** proc report 1;

** proc report 2;

ods rtf close;



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3 in conversation