Report/Group totals

3 posts, 0 answers
  1. Javier Gonzalez de Aragon
    Javier Gonzalez de Aragon avatar
    35 posts
    Member since:
    Mar 2010

    Posted 11 Jun 2015 Link to this post

    Hi, I created a report that gas one group. The data has the following form:

    OrderID | Date | OrderTotal | InvoiceID | InvoiceTotal

    1 | 2015-01-01 | 300 | 1 | 150

    1 | 2015-01-01 | 300 | 2 | 100

    1 | 2015-01-01 | 300 | 3 | 50

     

    The report groups on OrderID, so on the group header I have the info related to the order and on the detail section I have the info related to the invoices for each order. The group footer has a subtotal for the InvoicoTotal (this works fine. Returns value of 300). In the report footer I have a total for OrderTotal, and teh prblem here is that the value I am getting is 900 instead of 300. How can I achieve to sum on the group level and not on the detail level. I have already tried using Exec(scope, SUM) and RunningTotal(scope, SUM) but the result is the same.

  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 12 Jun 2015 Link to this post

    Hi Javier,

    With applied aggregate the data will be accumulated for the given data scope.

    If the total is already calculated in the retrieved data, you can directly display the field's value without applying aggregate, or use the First/Last/Max or other function suitable for your requirements. There is also a mechanism for creating custom aggregates.


    I hope the provided information is helpful.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Javier Gonzalez de Aragon
    Javier Gonzalez de Aragon avatar
    35 posts
    Member since:
    Mar 2010

    Posted 12 Jun 2015 in reply to Stef Link to this post

    Thanks for the reply. The solution doesn't work because there are multiple orders and what I need is a total for all the orders. If there is no built in solution then I will explore the custom aggregates approach.
Back to Top