In List & Label 21, we’ll add a couple of aggregate functions to the .NET component that work directly on the database. Of course, that’s only possible if the database supports it. Currently this feature is restricted to our SQL and ADO.NET data providers, and we’ll also add support for it in our enhanced ObjectDataProvider which I’ll blog about soon. Usage is simple – I’ve hidden this gem in the screen shot of the last feature focus already. See the Sales column on the very right hand side?
The content of this column simply is:
Products.UnitPrice*NativeSum (Order_Details.Quantity,Order_Details.ProductID = Products.ProductID)
Which reads as “Multiply the unit price with the database’s sum of the Quantities of all products that have the current product’s ProductID”. This kind of summation is lightning fast, yet gives you very valuable business insights. Of course you could do this before as well, but you either had to provide an aggregate field in the data source (good if you were able to change it) or you had to work with invisible sub tables that just aggregated values – not really what’s generally considered a clean solution and very slow compared to the new approach.
Besides summations the providers support quite a huge range of aggregate functions:
New feature of report genrator version 21
Your custom data providers can be extended as well – we’ll make sure to ship samples that will help get you going.