BookmarkSubscribeRSS Feed
knveraraju91
Barite | Level 11

Dear,

 

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

 

five

102 ( 60.1

80 ( 30.0)

 

 

 

code

 

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;
run;

ods rtf close;

4 REPLIES 4
ballardw
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.

knveraraju91
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.

 

 

 

 

ballardw
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.

Cynthia_sas
SAS Super FREQ

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

cynthia

 

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

** proc report 2;

ods rtf close;

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3501 views
  • 2 likes
  • 3 in conversation