I'm trying to move from my comfortable PROC TABULATE towards PROC REPORT. It appears to have many more options for my purposes. Here is my current objective:
1) I want to keep the row sums, and hide (or maybe color white) the computed column.
2) In the listing window, the summary border shows around each cell. In ODS PDF and ODS RTF, it does not show at all. I just want one bold box to show in ODS PDF around the summary row.
Your help is always appreciated. (SAS Windows V9.4M4)
data have;
input A B C ;
DATALINES;
1 .4 1
2 1 0
3 2 1
4 1.2 0
;
ods pdf ;
PROC REPORT DATA=have nowd
style(summary)={ foreground=black borderwidth=2 bordercolor=black } ;
COLUMNS A B C ratio;
DEFINE A / display 'Subject';
DEFINE B / sum 'Time in Study';
DEFINE C / sum 'Number of Events';
define ratio / computed 'Event Rate' Format=5.3 ;
compute ratio ;
ratio=B.sum / C.sum ;
endcomp;
rbreak after /summarize ;
run;
ods pdf close;
Hi:
If you take advantage of the automatic variable that PROC REPORT uses internally (_BREAK_), then you can do what you want:
For the border lines you want above the summary, Here are some alternatives:
Hope this helps. Here's a paper about BREAK processing and PROC REPORT. https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf That should help you understand some of how BREAK processing works.
Cynthia
You want to hide the column named RATIO? You could simply exclude it from the COLUMNS statement and don't compute it. Why are you computing it anyway?
Hi:
If you take advantage of the automatic variable that PROC REPORT uses internally (_BREAK_), then you can do what you want:
For the border lines you want above the summary, Here are some alternatives:
Hope this helps. Here's a paper about BREAK processing and PROC REPORT. https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf That should help you understand some of how BREAK processing works.
Cynthia
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.