The SAS Output Delivery System and reporting techniques

Adding a blank line before the RBREAK summary

Posts: 22

Adding a blank line before the RBREAK summary

I want to add a blank line before the RBREAK summary. I tried adding the 'skip' syntax but it was ignored.


options notes linesize=max nodate missing='0';

  Title  "Summary Accrual for Screened and Treated Patients on All Early";

  Title2 "       Experiemental Therapeutic Clinical Trials";

  Title3 "&START_DT2 to &END_DT2";

  TITLE4 "Report Prepared: &PREP_DT";

      ods html file="&loca.PHASEI_TABLE5.xls" style=minimal;

      proc report data=SandT split='#' nowd headline headskip style(report)={font_face=arial font_size=0};

          column rowheading dc_num desc ('Pilot and/or Exploratory#IND Studies (Phase 0) Tx#Studies' count1a count1b total1)

                      ('PHASE 1 Tx Studies' count2a count2b total2)

                      ('PHASE 1 Combination Tx#Studies (includes phase 1/2#studies)' count3a count3b total3)

                      ('PHASE 2 Tx Studies' count4a count4b total4)

                      ('PHASE 2#Combination Tx#Studies' count5a count5b total5);

          define rowheading / '' style(column)=[width=8%];

          define dc_num     / '' style(column)=[width=8%];

          define desc     / '' style(column)=[width=8%];

          define count1a  / 'Screened#Only' style(column)=[width=7%];

          define count1b  / 'Screened &#Treated' style(column)=[width=7%];

          define total1   / 'Total' style(column)=[width=4.5%];

          define count2a  / 'Screened#Only' style(column)=[width=7%];

          define count2b  / 'Screened &#Treated' style(column)=[width=7%];

          define total2   / 'Total' style(column)=[width=4.5%];;

          define count3a  / 'Screened#Only' style(column)=[width=7%];

          define count3b  / 'Screened &#Treated' style(column)=[width=7%];

          define total3   / 'Total' style(column)=[width=4.5%];;

          define count4a  / 'Screened#Only' style(column)=[width=7%];

          define count4b  / 'Screened &#Treated' style(column)=[width=7%];

          define total4   / 'Total' style(column)=[width=4.5%];

          define count5a  / 'Screened#Only' style(column)=[width=7%];

          define count5b  / 'Screened &#Treated' style(column)=[width=7%];

          define total5   / 'Total' style(column)=[width=4.5%];




ods html close;

Posts: 8,647

Re: Adding a blank line before the RBREAK summary


  SKIP (and other LISTING only options) are ignored by ODS destinations like RTF, PDF and HTML. I see that you have your SKIP on an RBREAK AFTER statement.  You have to use a LINE statement in a COMPUTE block in order to have ODS replicate what the SKIP option does. See the code below. Right now, I have put text strings into the LINE statement, so you can see how they look. But you can just use LINE ' '; instead of a text string to get an empty line.


ods html file='c:\temp\tryrbreak.html';

proc report nowd;
  where region in ('Pacific', 'Canada');
  title 'title1';
  column region product sales inventory returns;
  define region / group;
  define product / group;
  break after region / summarize;
  rbreak after / summarize;
  compute after region;
    ** can use line ' ' * for empty line;
    line 'break after' ;
  compute after;
    line 'rbreak after';
ods html close;

Posts: 22

Re: Adding a blank line before the RBREAK summary

Forgive my ignorance as I am rather new to Proc Report.

I do not have any groups in the report. It is just a listing a records from the data set. At the end I want a blank line and the summary. (Actually, after the summary, I want another blank line and just a summary of 3 specific columns).

I can follow the compute logic, I am just a bit wary of the group thing.

Does adding the group define cause detail records to disappear and magically become a group subtotal?

Posts: 8,647

Re: Adding a blank line before the RBREAK summary


  If you are new to PROC REPORT and you do not want GROUP usage, then you can switch to ORDER usage, which will NOT collapse the report rows. If you run the code above, but change ALL the instances of GROUP to ORDER, you will see a noticeable difference in the output. With ORDER usage, the "detail" records will be preserved; but with GROUP usage, the "detail" records will be collapsed for each group.

  There is a documentation topic entitled, "How PROC REPORT Builds a Report" that is an excellent introduction to the differences between DISPLAY, ORDER, GROUP and ACROSS usages.


Posts: 22

Re: Adding a blank line before the RBREAK summary

Thank you. I will be back on this report tomorrow.

Post a Question
Discussion Stats
  • 4 replies
  • 2 in conversation