Sum of values in a reportviewer column RRS feed

  • Question

  • Hi to everyone!Can you help me guys to display sum of all numeric values from one reportviewer table into another..

    I tried this way: =Sum(Fields!Volume.Value), but i have #Error in my field instead the sum.


    Sunday, May 27, 2012 7:07 PM

All replies

  • Alex,

    Are you using several datasets in one report ?

    You cannot sum a value from a different report. You can retrieve a value from a textbox on the same report, by using the ReportItems collection.

    Tuesday, May 29, 2012 4:11 PM
  • No i am using only  one dataset and one datatable. Can you show me how to use ReportItems feature?


    Wednesday, May 30, 2012 2:09 PM
  • Alex,

    If you have only one dataset and one report, then things should be simple !!

    In a report, the usual way of summing up values is to use the Sum(Fields!nameOfField.Value) syntax. This will sum up the values of one field, up to the point where this formula is called. If you place the formula inside a group, it will display the sum for the group. If you place this formula at the end of the report, it will display the sum for all the report.

    So your formula :


    should work and give you the sum of Volume, up until where it is placed. Please let me know where you have this formula.

    The ReportItems collection is simply the collection of textboxes on the report. If you have a textbox named "TextBox1", the ReportItems!TextBox1.Value will retrive its content.

    Wednesday, May 30, 2012 2:38 PM
  • Mine is not working also. :(
    I called the dataset from the database and I dont know why nothing is outputting.
    Thursday, June 6, 2013 6:27 AM