I have a created a report for payments and I need to be able to put totals at the bottom of each page such as the total number of payments, total balance etc. The rdlc designer will not allow me to reference Fields in the page footer? Thanks for the help
Edit expression
Enter something like this.
=Sum(Fields.BLAH.Value)
Thanks,
Eric-
Updated Answer
To do what you're asking, you need to access the ReportItems collection.
- The ReportItems collection is the collection of text boxes on each page after report rendering occurs.
The following will allow you to put the total for a "Payment" column in the footer of each page. The total will be only the total of the column on that particular page and not the total for the entire report:
=SUM(ReportItems!Payment.Value)
Old Answer
You need to set the scope of the SUM aggregate function to be based on the dataset from which the report is created.
The following will work for you (just change the desired field to sum and the name of your dataset:
=Sum(Fields!ID.Value, "DataSet1")
You can even take things a step further if you want to filter the dataset. The following code will limit the sum to IDs over 4 (modify the example and take it as you need):
=Sum(IIF(Fields!ID.Value < 4,0,Fields!ID.Value), "DataSet1")