The SAS Output Delivery System and reporting techniques

Space after Summarizing - Urgent

Accepted Solution Solved
Reply
Regular Contributor
Posts: 155
Accepted Solution

Space after Summarizing - Urgent

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


Capture.JPG

Accepted Solutions
Solution
‎05-04-2012 12:03 PM
SAS Super FREQ
Posts: 8,740

Re: Space after Summarizing - Urgent

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;

View solution in original post


All Replies
Super Contributor
Posts: 349

Re: Space after Summarizing - Urgent

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

SAS Super FREQ
Posts: 8,740

Re: Space after Summarizing - Urgent

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

Regular Contributor
Posts: 155

Re: Space after Summarizing - Urgent

Hi Cynthia,

My output destination is PDF.I want my extra space only before the summary line.

Solution
‎05-04-2012 12:03 PM
SAS Super FREQ
Posts: 8,740

Re: Space after Summarizing - Urgent

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;

Regular Contributor
Posts: 155

Re: Space after Summarizing - Urgent

thx cynthia,

I used the second method.What is the use of vjust?

SAS Super FREQ
Posts: 8,740

Re: Space after Summarizing - Urgent

It is vertical "justification" or vertical alignment. Change it to vjust=t or vjust=m and see the difference.

cynthia

☑ This topic is SOLVED.

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

Discussion stats
  • 6 replies
  • 281 views
  • 0 likes
  • 3 in conversation