The SAS Output Delivery System and reporting techniques

Including Data Values in ODS Contents= statements

Reply
New Contributor
Posts: 4

Including Data Values in ODS Contents= statements

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
SAS Employee
Posts: 174

Re: Including Data Values in ODS Contents= statements

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
SAS Super FREQ
Posts: 8,743

Re: Including Data Values in ODS Contents= statements

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]
New Contributor
Posts: 4

Re: Including Data Values in ODS Contents= statements

Thanks, David and Cynthia. I went with the BY variables. Looks great.

Earl
Ask a Question
Discussion stats
  • 3 replies
  • 116 views
  • 0 likes
  • 3 in conversation