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
SAS Super FREQ
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

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