The SAS Output Delivery System and reporting techniques

ODS,Proc report & break (or lack of)

Reply
Regular Contributor
Regular Contributor
Posts: 170

ODS,Proc report & break (or lack of)

Hello all;
I am trying to introduce breaks between sections within a proc report statement. This works normally but not within the ODS statements as I read in the SAS guide to Report Writing.

Is there is an easy way to create white speaces between sections?
Pertinent code follows below. Thank you.

Lawrence


proc report data=priormonth nowd ;
column header _label_ bwcat1 bwcat2 bwcat3 bwcat4 bwcat5 total ;

define header /order format=H. Width=20 ' ' style={background=lavender} ;

define _label_ /width=20 " " ;
define bwcat1 / "BWCAT1 (0-750 grams)" format=5.0 ;
define bwcat2 /"BWCAT2 (750 - 1000 grams)" format=5.0 ;
define bwcat3 /"BWCAT3 (1001 - 1500 grams)" format=5.0 ;
define bwcat4 /"BWCAT4 (1501 - 2500 grams)" format=5.0 ;
define bwcat5 /"BWCAT5 (>2500 grams)" format=5.0 ;
define total /"TOTAL*" format=5.0 style={background=gold};
break after header /skip;
Super Contributor
Super Contributor
Posts: 3,174

Re: ODS,Proc report & break (or lack of)

It would help to also include your ODS statement usage, since the SAS behavior may be different depending on whether it is HTML, PDF, etc.

Scott Barry
SBBWorks, Inc.
SAS Super FREQ
Posts: 8,862

Re: ODS,Proc report & break (or lack of)

Hi:
It is true that the SKIP option does not work with ODS in the manner that it works with LISTING.

However, you CAN use a LINE statement with ODS and PROC REPORT to accomplish the same thing that SKIP does. Relevant code snippet below.

(PS: WIDTH= is also ignored by ODS ... see this link for more "workarounds" for LISTING options that are not used by ODS (such as HEADLINE, WIDTH, etc)
http://support.sas.com/kb/2/549.html
http://support.sas.com/rnd/base/ods/templateFAQ/report1.html)

cynthia

[pre]
define header /order format=H. Width=20 ' ' style={background=lavender} ;
... more code ...
break after header /skip;
compute after header;
line ' ';
endcomp;

[/pre]
Ask a Question
Discussion stats
  • 2 replies
  • 100 views
  • 0 likes
  • 3 in conversation