BookmarkSubscribeRSS Feed
odmhx
Calcite | Level 5
I am using 'holding variables' to compute and display multiple summaries at the end of the report and don't know how to order them the way I want.

I want:

regular total: 123,457.00
bccp total: 1,230.00
mfp total: 3,210.00
total: 127,697.00

but the output report always displays as

mfp total: 3,210.00
bccp total: 1,230.00
regular total: 123,457.00
total: 127,697.00

My code:
break after regular/sumarize;
compute after regular;
ffp_type = 'regular total: ';
reimb.sum = regsum;
endcomp;

break after bccp/sumarize;
compute after bccp;
ffp_type = 'bccp total: ';
reimb.sum = bccpsum;
endcomp;

break after mfp/sumarize;
compute after mfp;
ffp_type = 'mfp total: ';
reimb.sum = mfpsum;
endcomp;

rbreak after /summarize;
compute after;
ffp_type = 'total: ';
reimb.sum = grandtot;
endcomp;

Can you help me?

Thanks a lot! Message was edited by: odmhx
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I believe that the COLUMNS statement controls the sequence of variable sort-order, so the right-most variable in the COLUMNS statement will "break" first, and so your final set (at RBREAK) of summary rows will have influenced by the COLUMS variable list. Suggest you share the rest of your PROC REPORT code in future posts / replies using COPY/PASTE, ideally as it is executed (from the SAS log) especially when diagnostic messages are meaningful.

Scott Barry
SBBWorks, Inc.
odmhx
Calcite | Level 5
> I believe that the COLUMNS statement controls the
> sequence of variable sort-order, so the right-most
> variable in the COLUMNS statement will "break" first,
> and so your final set (at RBREAK) of summary rows
> will have influenced by the COLUMS variable list.
> Suggest you share the rest of your PROC REPORT code
> in future posts / replies using COPY/PASTE, ideally
> as it is executed (from the SAS log) especially when
> diagnostic messages are meaningful.
>
> Scott Barry
> SBBWorks, Inc.


Thank you so much! Yes, you are right. I reversed the columns order and they turned out correct.
I will include more of my code in the future whenever i ask question here. But I found that that alignment of the statements is always screwed up, and may make my message even less readable.... Message was edited by: odmhx

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 582 views
  • 1 like
  • 2 in conversation