BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JasonNC
Quartz | Level 8

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
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

6 REPLIES 6
shivas
Pyrite | Level 9

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

Cynthia_sas
SAS Super FREQ

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

JasonNC
Quartz | Level 8

Hi Cynthia,

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

Cynthia_sas
SAS Super FREQ

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;

JasonNC
Quartz | Level 8

thx cynthia,

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

Cynthia_sas
SAS Super FREQ

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

cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
How to Concatenate Values

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.

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
  • 6 replies
  • 1105 views
  • 0 likes
  • 3 in conversation