BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MelissaM
Obsidian | Level 7

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  If you take advantage of the automatic variable that PROC REPORT uses internally (_BREAK_), then you can do what you want:

Cynthia_sas_0-1597771801039.png

 

For the border lines you want above the summary, Here are some alternatives:

Cynthia_sas_1-1597772724167.png

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

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

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?

--
Paige Miller
MelissaM
Obsidian | Level 7
To clarify: I don't want to hide the ENTIRE column 'ratio'. I only want to display the summary row. I do not want the individual row values to display.
MelissaM
Obsidian | Level 7
I posted below in a document what I "HAVE" and what I "WANT". It might clarify better.
Cynthia_sas
SAS Super FREQ

Hi:

  If you take advantage of the automatic variable that PROC REPORT uses internally (_BREAK_), then you can do what you want:

Cynthia_sas_0-1597771801039.png

 

For the border lines you want above the summary, Here are some alternatives:

Cynthia_sas_1-1597772724167.png

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

MelissaM
Obsidian | Level 7
Thank you, Cynthia! This is exactly what I was looking for!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 6 replies
  • 1623 views
  • 4 likes
  • 3 in conversation