views:

1370

answers:

1

First, a sample of what I am trying to accomplish (Evaluation time - Auto):

Group 1                 Amt      %
  - Group 2 item       4      33.3%
    - Group 3 item     1      25.0%
    - Group 3 item     3      75.0%
  - Group 2 item       8      66.7%
    - Group 3 item     5      62.5%
    - Group 3 item     3      37.5%
Total                      12      100%

What has been calculated

Evaluation time - Group 1

Group 1                 Amt      %
  - Group 2 item       4      66.7%
    - Group 3 item     1      25.0%
    - Group 3 item     3      75.0%
  - Group 2 item       8      66.7%
    - Group 3 item     5      62.5%
    - Group 3 item     3      37.5%
Total                      12      100%

Evaluation time - Group 2

Group 1                 Amt      %
  - Group 2 item       4      100%
    - Group 3 item     1      25.0%
    - Group 3 item     3      75.0%
  - Group 2 item       8      66.7%
    - Group 3 item     5      62.5%
    - Group 3 item     3      37.5%
Total                      12      100%

I am calculating the Group 2 Amounts using a variable which sums up the Group 3 amounts and resets every Group 2. (sumG2)

The Group 1 total amount is calculated by summing up the Group 3 amounts using a variable which resets every Group 1. (sumG1)

I am trying to calculate the Group 2 item percentages via (sumG2) / (sumG1) but any evaluation time that I use for the Group 2 % field yields the incorrect result. This is due to the different evaluation/reset groups for sumG2 and sumG1. Calculating the Group 3 percentages is easily done since only one variable is necessary.

Is there any way to calculate Group 2 percentages without rewriting the original query?

Edit: While getting sample results for Matthew, I tried Auto for evaluation time and it got the desired results. I remember using Auto previously and having it not work so I just stayed away from it.

A: 

An example of what the incorrect data is would be potentially helpful in determining what it is actually doing.

Also, can you post your jrxml file or at least the pertinent parts of it?

Matthew Brubaker