BookmarkSubscribeRSS Feed
Earl_W
Calcite | Level 5
Hi,

I have a report that breaks on change of value of a column, e.g.

proc report data=xxx contents='Some Report';
columns category x y;
define category / order ...;
define x / display ...;
define y / display ...;
break before category / page contents=value-of-category;
run;

Is this possible? I could make category a BY variable, but this way would be cool to do.

Earl
3 REPLIES 3
David_SAS
SAS Employee
Earl,

You cannot do what you want with PROC REPORT. You can do it with
PROC TABULATE by specifying your class (categorical) variables in the TABLE
statement page dimension.

-- David Kelley, SAS
Cynthia_sas
Diamond | Level 26
Hi:
BY groups will do it for you in PROC REPORT, however.
cynthia
[pre]
proc sort data=sashelp.shoes out=shoes;
by product region;
where product in ('Boot', 'Sandal');
run;

ods pdf file='c:\temp\test_contents.pdf';
ods proclabel 'Some Report';
proc report data=shoes nowd contents='';
by product;
columns product region sales returns;
define product / group ;
define region / group;
define sales / sum ;
define returns / sum ;
break before product / contents='' page;
run;
ods pdf close;
[/pre]
Earl_W
Calcite | Level 5
Thanks, David and Cynthia. I went with the BY variables. Looks great.

Earl

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1403 views
  • 0 likes
  • 3 in conversation