Hi everyone,
I'd like to know if there is a way to keep some horizontal padding between my columns, but not between my rows in Proc Report. Currently, I am doing something like this:
proc report data=temp ls=120 ps=40 nowd style(report)=[frame=hsides rules=groups cellpadding=1 cellspacing=0 ];
,but I would like to increase the distance between the columns, without reducing the number of rows on my page. The only option I've found is to manually set the width of the columns.
Thanks!
style={cellspacing=20}
could work ?
also try the following style on your variables.
style={pretext=' ' posttext=' '}
Which destination, since not all options work for all destination, and what style are you currently using?
Do you need additional space before, after or both of displayed values?
Hi Ballardw,
Thanks for replying! I'm currently outputting to ODS RTF, then I have a VBScript that opens the RTF and saves to PDF.
I'd answer "both" to your question. Basically, my problem is that I have wide headers (say 6 characters) but narrow data (say 1 digit). With a cellpadding of 1, the headers are hard to distinguish as the gap between each word is very small.
I dunno really. I was pushed that way here :
I'm using a few commands that (may?) only work in ODS RTF, such as "pretext='\ql\li360" to indent some columns. Like here :
http://support.sas.com/resources/papers/proceedings09/027-2009.pdf
Hi,
There are other ways to perform indents other than RTF control strings. For example, consider the code below, which works in both RTF and PDF. This is an older example that was posted in the forum in response to an earlier question. I can't take a screen shot now, but this should still work for you. No VB required to make a PDF that has indents.
cynthia
ods listing close;
ods pdf file='c:\temp\indent.pdf';
ods rtf file='c:\temp\indent.rtf';
proc report data=sashelp.class nowd;
where sex = 'F';
column name;
define name / display;
compute name;
if name in ( 'Barbara', 'Carol', 'Janet', 'Joyce') then
call define(_col_,'style','style={leftmargin=.25in}');
endcomp;
run;
ods _all_ close;
Hi Cynthia,
Thanks for the heads up. I'll give direct outputting to PDF a better look. Do you have links to papers that show best practices for Proc Report using ODF PDF handy?
Also, I'm afraid I'm stuck with 9.3
thanks
Cool, thanks!
What about changing the borderbottomcolor and justificated in a spanned header cell, like
("^S={just=c borderbottomcolor=&lightgrey.} Metrics^{super 1}" height weight )
In the code below?
thanks,
Simon
--------------
ods rtf file="c:\temp\report.rtf" style=styles.custom;
OPTIONS NODATE NONUMBER;
ods escapechar = '^';
proc sort data= sashelp.class out=temp;; by sex height weight;
run;
data temp;
set temp;
by sex;
if first.sex then sex2= sex;
else sex2="";
obs=_n_;
weight_cat= floor(weight/10)*10;
_empty=' ';
run;
proc report data=temp ls=120 ps=40 nowd
split="*"
style(report)=[]
style(header)= [just=r]
style(column)= [just=r];
column
obs
sex2
name
("^S={just=c borderbottomcolor=&lightgrey.} Metrics^{super 1}" height weight )
row_color
;
define obs /display noprint;
define sex2/display "Sex" style(header)=[just=l borderbottomcolor=&lightgrey.] style(column)=[just=l];
define name /display "Name" style(header)=[just=l borderbottomcolor=&lightgrey.] style(column)=[just=l];
define height/display "Height" format =5.1 style(header)=[just=r borderbottomcolor=&lightgrey.] style(column)=[just=r];
define weight /display "Weight^{super 2}" format =5.0 style(header)=[just=r borderbottomcolor=&lightgrey.] style(column)=[just=r ] format=16.;
define row_color /computed noprint;
compute row_color;
if mod(obs,2)=1 then call define (_row_,"style","style=[background=&verylightgrey.]");
endcomp;
run;
quit;
ods rtf close;
style={cellspacing=20}
could work ?
also try the following style on your variables.
style={pretext=' ' posttext=' '}
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: