Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
9364
Total for only visible rows
posted

We have this this layout using Grid

     ProductGroupA    RolledUpQty   

            Product1     Qty1     StatusA

            Product2     Qty2     StatusB

            Product3     Qty3     StatusA

            Product4     Qty4     StatusB

   Product Group shows in parent band, all products rows show in child band, using parent-child table relationship.

Right now RolledupQty is sum of Qty1, Qty2, Qty3 and Qty4 i.e. qty for all products in that product group. I am using .NET Calculated column capability to roll up the value for all child rows. 

I will need to change my implementation because user wants to be able to filter rows using Status and the RolledUpqty to reflect that.

So, for example, if I filter for StatusA, then RolledUpQty should show sum of Qty1 and Qty3 only i.e. Product2 and Product 4got excluded from the total. Conversely, if I filter on StatusB, RolledUpQty should show sum of Qty2 and Qty4 i.e. Product1 and Product3 got excluded. 

In short, the RolledUpQty is qty total of only rows that are visible after filter. What is the best way to achieve this?