Hi,
In Proc report I am using
Rbreak After / skip summarize
computr after;
county="*All Counties"
end;
Please find my attached file i want some more space between them
Hi:
If your destination is PDF, then SKIP and OL will not do anything for you. Those options are LISTING options and ignored by ODS PDF. I think there are 2 ways to get space before your RBREAK summary line 1) to make a fake or "extra" break variable and then use a LINE statement to write out as many extra lines as you want. And, 2) the other way is to increase the cellheight of the summary line. If you run the code below you will see the primary difference between the 2 methods is that with method 1, you will see an interior line above the summary and with method 2, you do not see an interior line above the summary.
cynthia
ods listing close;
data class;
length county $50;
set sashelp.class;
where age ge 15;
xtrabreak = 'x';
if sex = 'F' then county = 'Coldwater';
else county = 'Taliesin';
run;
ods pdf file='c:\temp\morespace.pdf'
style=sasweb;
proc report data=class nowd;
title 'Method 1 -- you control how many "lines"';
column xtrabreak county name age height weight;
define xtrabreak / order noprint;
define county / order ;
rbreak after / summarize
style={font_weight=bold};
compute after xtrabreak;
line ' ';
line ' ';
line ' ';
endcomp;
compute after ;
county = '*All Counties*';
endcomp;
run;
proc report data=class nowd;
title 'Method 2 -- you use CELLHEIGHT';
column county name age height weight;
define county / order ;
rbreak after / summarize
style={font_weight=bold
cellheight=1in vjust=b};
compute after ;
county = '*All Counties*';
endcomp;
run;
ods _all_ close;
Hi ,
Try this..
proc report data=sashelp.class nowd;
column name sex age height weight;
define sex/group;
define name /display;
define age /display;
define height/display;
define weight/display;
rbreak After / skip summarize ol;
compute after sex;
sex="Total";
line ' ';
line ' ';
endcomp;
run;
Thanks,
Shiva
Hi:
First of all the SKIP option and the OL option are only respected and used in the LISTING destination. I can't tell exactly what destination your screen capture is showing, so it is hard to make a specific suggestion.
However, IF you want more space after the last row of data values in the report and before the summary line for "*All Counties*", then you could try adding some extra break lines or empty lines using different techniques. The technique will vary, depending on your destination of choice. What kind of output do you want (HTML, RTF, PDF, LISTING, CSV)? And where, exactly, do you want your extra space -- between the columns or before last summary line?
cynthia
Hi Cynthia,
My output destination is PDF.I want my extra space only before the summary line.
Hi:
If your destination is PDF, then SKIP and OL will not do anything for you. Those options are LISTING options and ignored by ODS PDF. I think there are 2 ways to get space before your RBREAK summary line 1) to make a fake or "extra" break variable and then use a LINE statement to write out as many extra lines as you want. And, 2) the other way is to increase the cellheight of the summary line. If you run the code below you will see the primary difference between the 2 methods is that with method 1, you will see an interior line above the summary and with method 2, you do not see an interior line above the summary.
cynthia
ods listing close;
data class;
length county $50;
set sashelp.class;
where age ge 15;
xtrabreak = 'x';
if sex = 'F' then county = 'Coldwater';
else county = 'Taliesin';
run;
ods pdf file='c:\temp\morespace.pdf'
style=sasweb;
proc report data=class nowd;
title 'Method 1 -- you control how many "lines"';
column xtrabreak county name age height weight;
define xtrabreak / order noprint;
define county / order ;
rbreak after / summarize
style={font_weight=bold};
compute after xtrabreak;
line ' ';
line ' ';
line ' ';
endcomp;
compute after ;
county = '*All Counties*';
endcomp;
run;
proc report data=class nowd;
title 'Method 2 -- you use CELLHEIGHT';
column county name age height weight;
define county / order ;
rbreak after / summarize
style={font_weight=bold
cellheight=1in vjust=b};
compute after ;
county = '*All Counties*';
endcomp;
run;
ods _all_ close;
thx cynthia,
I used the second method.What is the use of vjust?
It is vertical "justification" or vertical alignment. Change it to vjust=t or vjust=m and see the difference.
cynthia
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.