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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1192 views
  • 4 likes
  • 3 in conversation