Question

My situation is almost like this link.

I grouped and suppressed the detail and displayed result on group header, but @total is summing all records rather summing the distinct one's .

Please suggest how to achieve this.

enter image description here

Was it helpful?

Solution

Assuming group 4 is the distinctly selected group, it should work with a running total. Set the Summary field to the field you are totaling, the Evaluate option to On change of group (selecting group 4), and Reset to Never.

If you need to pull distinct records that are not grouped in group 4 (or one of the other groups), then you would probably have to write a running total manually. Then, you can use whatever logic makes sense for when to add to the total.

If they are not in any set order, you would have to be fancier, I'd personally use an array to keep track of which records have been added to the total. If a record is in the array, don't do anything, and if it isn't, add to the total and then add the record to the array.

OTHER TIPS

Do you mean that you want total of each group..?? If yes then then try placing your @total in that group footer section not in Report Footer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top