BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
crichmond410
Calcite | Level 5

Hi all,

I am new to proc report and am having trouble finding an answer to the below. I am in enterprise v8.5.

 

I have output that looks like this:

crichmond410_1-1745256369950.png

I want to add two types of "total" summary rows - one for sub locations and one for parent location. When I do so, it looks like this:

crichmond410_2-1745256407614.png

I would like to remove the labels in red, as those rows are the totals for the sub location rather than the parent location, and ideally keep all cells for the parent location merged together until the final "Total Parent 1" row, so that it looks like this:

crichmond410_0-1745256344611.png

Is this possible? My code is below.

proc report data=disc spanrows headline headskip split="|";
define ParentLocation / order center;
define SubLocation / order center;
define DataPtA / display "Data|Pt A";
define DataPtB / display "Data|Pt B";
column ("Location" ParentLocation SubLocation)
  DataPtA DataPtB;

break after ParentLocation / summarize;
  compute after ParentLocation;
    ParentLocation="Total " || ParentLocation;
    call define (_row_,'style', 'style=[font_style=bold]');
  endcomp;

break after SubLocation / summarize;
  compute after SubLocation;
    SubLocation="Total " || SubLocation;
    call define (_row_,'style', 'style=[font_style=italic]');
  endcomp;

run;

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

This method puts text on reports where there is none, but the same thing ought to work for removing text that you don't want.

Solved: PROC REPORT, can you place descriptive text in a BREAK or RBREAK row? - SAS Support Communit...

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

This method puts text on reports where there is none, but the same thing ought to work for removing text that you don't want.

Solved: PROC REPORT, can you place descriptive text in a BREAK or RBREAK row? - SAS Support Communit...

--
Paige Miller
crichmond410
Calcite | Level 5
Ah, easy fix, thank you! I needed to add the following to my sub location compute: SubLocation="";

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 297 views
  • 0 likes
  • 2 in conversation