You are on page 1of 5

Report Studio Filtering and Auto Group and Summarization

A problem was reported caused, in part, by a combination of automatic summarization and filter timing. The following listing included zero balances even when the following filter was required: [Receivable Revenue].[Receivable Account Detail].[BALANCE] <> 0.

It will make it clearer if we restrict the report to some of the students that appear in the list with zero balances (and group on ID):

5/20/2010

Page 1

Report Studio
There are two default settings that need to be examined: 1. The Auto Group and Summarize property of the query is set to Yes.

2. The filter is set to be applied before Auto Aggregation.

By default, with the Auto Group and Summarize property of the query set to Yes, Cognos will not display records with attribute values that are exactly like those in other records. Also, by default, measures (numeric field values) are summarized for the records that are grouped. The Balances are not used to differentiate the records since they are measures.

5/20/2010

Page 2

Report Studio

In the example report, if the Auto Group and Summarize property of the query is set to No, the output looks like this for 910752964 (the report has been further grouped on semester and the Balance aggregation has been set to Total):

Note that the individual records have the same values in every column except for the Balance. However, when the individual balances for the semester are summarized, the semester balance is zero. The filter is being applied before the auto aggregation, by default. Therefore, the only records that are eliminated from the report are the detail records that have a balance of zero. If the detail records sum to zero, they are still included in the report due to the filter timing. In this case, we want to filter the detail records based on their grouped sum. To change the filter timing, click on the query and then click on the filter. In the Properties, change the Application property to After Auto Aggregation.

5/20/2010

Page 3

Report Studio

To see the effects of this change, the Auto Group and Summarize property needs to be set back to Yes. Click on the query in the Query Explorer and set this property. When the report is run now, the semesters that balance to zero are excluded (910750250 was the only one of the three in the report that had a non-zero balance in one of the semesters):

When the filter based on the ID is removed, the report yields the required results (the Application property of the filter is set to After Auto Aggregation and Auto Group and Summarize is set to Yes):

5/20/2010

Page 4

Report Studio

Notice that the zero balance records are now excluded. To avoid the grouping problem, include enough fields in the report to differentiate each detail row at the appropriate level of summary (for example, add Transaction_Number). You can then cut the column to exclude it from the report display without affecting the summarization. The other solution is to set the Auto Group and Summarize property to No but there is a slight performance degradation if you use this option.

5/20/2010

Page 5

You might also like