BookmarkSubscribeRSS Feed
pasvorto
Calcite | Level 5

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

%land;

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%];

          RBREAK AFTER/SUMMARIZE;

          RBREAK AFTER / SUMMARIZE SKIP;

run;

ods html close;

4 REPLIES 4
Cynthia_sas
SAS Super FREQ


Hi:

  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.

cynthia

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

proc report data=sashelp.shoes 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' ;
  endcomp;
  compute after;
    line 'rbreak after';
  endcomp;
run;
ods html close;

pasvorto
Calcite | Level 5

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?

Cynthia_sas
SAS Super FREQ

Hi:

  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.

cynthia

pasvorto
Calcite | Level 5

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4 replies
  • 1360 views
  • 0 likes
  • 2 in conversation