Page 1 of 1
Is it possible to sum filtered rows?
Posted: Wed Feb 10, 2010 2:48 am
by misiek_1984
Hello
I have a report in which I use filters. At at the same time I want to calculate sums of chosen columns taking into account all rows - visible in the report and filtered. I spend some time trying to do it but I did not find solution.
Michał Komorowski
Is it possible to sum filtered rows?
Posted: Wed Feb 10, 2010 3:01 am
by Jan
Hello Michał,
You can use following expression:
Code: Select all
Totals.Sum(DataSource, Expression)
Thank you.
Is it possible to sum filtered rows?
Posted: Wed Feb 10, 2010 3:29 am
by misiek_1984
Thanks for the replay but I forgot to write that I use grouping in my report and I need one sum per group. The structure of report is as follow:
MyGroupHeaderBand
MySum
--- MyDataBand
In MyDataBand I need to use filters. The value of MySum depends on the current group however it should take into account rows filtered by MyDataBand. If it is possible I can hide the rows in some way insted of using filters.
Michał Komorowski
Is it possible to sum filtered rows?
Posted: Wed Feb 10, 2010 6:50 pm
by Edward
Hi Michał,
Please use the following expression for grouping:
Totals.Sum(GroupHeaderBand, Expression)
Some rows you could disable in the BeforePrintEvent of the DataBand.
Please open attached report in the Demo.exe sample application.
Thank you.