The SAS Output Delivery System and reporting techniques

ODS Reporting Break Summarize Question.

Reply
Occasional Contributor
Posts: 7

ODS Reporting Break Summarize Question.

Hello community,

I am using EG4.1 , I am producing a report for output in HTML.

My question centers around how to use the summarize command but not summarize ALL Columns.


My data example is as follows (periods simply for spacing in post)

Name... value1..value2..Difference
----------------------------------------------------
Name1.....10.....20.....-50%
Name2.....15.....10..... 33%
Name3.....10.....0.....100%
---------------------------------------------------
Totals.....35.....30..... XXXXXX <-----------problem.

When using the summarize option on a break statement it summarizes all columns , even the percentages. I wish to evaluate the percentage based on the totals of value1 and value2 not the values of the difference.

Is there a way to do this?
SAS Super FREQ
Posts: 8,863

Re: ODS Reporting Break Summarize Question.

Hi:
"ODS Reporting" doesn't necessarily mean PROC REPORT -- you could be using PROC TABULATE or PROC PRINT or even PROC SQL (or even the DATA step). So, can you also explain what your reporting PROCEDURE of choice is (REPORT, PRINT, TABULATE, SQL)?

Can you also explain a bit about how the DIFFERENCE column is being derived and percentage is being calculated (the specific formula)
DIFFERENCE = (VALUE1 - VALUE2) / ??divided by???

Also, are you calculating DIFFERENCE in a query within EG or are you using a DATA step program or reporting procedure to calculate DIFFERENCE ???

Generally, with EG, there is a way to "preview" the code that is being submitted to SAS for processing. Can you show that code here???

If you are using PROC PRINT or PROC TABULATE, then there would be no way to alter the totals calculated on the break line. If you are using PROC REPORT, then you could probably either suppress the total for DIFFERENCE or recalculate (using your own formula) the number for DIFFERENCE in a COMPUTE block.

Also, in order to maintain spacing and indenting in code and output that you show, you can use the techniques described in this previous forum posting, such as the use of the [pre]and [/pre] tags around your code and output in order to maintain indenting and spacing.:
http://support.sas.com/forums/thread.jspa?messageID=27609毙

as I did to show your desired output below (without dots)
[pre]

Name value1 value2 Difference
----------------------------------------------------
Name1 10 20 -50%
Name2 15 10 33%
Name3 10 0 100%
---------------------------------------------------
Totals 35 30 XXXXXX <-----------problem
[/pre]

cynthia
Super User
Posts: 10,020

Re: ODS Reporting Break Summarize Question.

Hi.
I am not familiar with EG.
If you use proc report code.
and assuming your grouping variable is name ,then can do such as:
[pre]
.........
compute difference;
if _break_ eq 'NAME' then difference=' ';
.................
[/pre]


Just a recommendation.
And I think Cynthia can do better than me.

Ksharp
Ask a Question
Discussion stats
  • 2 replies
  • 106 views
  • 0 likes
  • 3 in conversation