# SubTotals and Totals in Report

• ### Question

• I have a list based report with 3 datasets and i was wondering can i have a row which will give me a value sum of all 3 datasets

```Dataset 1
iif(Sum(Fields!Hail.Value) is nothing , "0", Sum(Fields!Hail.Value))
Dataset 2
Sum(Fields!TDY_Hail.Value) + Sum(Fields!Hail.Value, "DataSet1")
Dataset 3
Sum(Fields!TDY_Hail.Value) + Sum(Fields!Hail.Value, "DataSet1")
We have 3 diff tablix with 3 datasets and under each tablix cell i found the above expression.
Can i sum the values from all 3 datasets and make it a grand total.. ??
How can i do that?```

FM

Tuesday, October 30, 2012 5:01 PM

• Hello FM

Thanks for your posting. in the first data set can you please change the expression like this

Dataset 1
iif
(Sum(Fields!Hail.Value) is nothing , 0, Sum(Fields!Hail.Value))

please do not put quotes around 0.

=val(ReportItems!Catch3.Value) + val(ReportItems!Textbox70.Value) + val(ReportItems!Textbox80.Value)

`=val(ReportItems!Catch3.Value) + val(ReportItems!Textbox70.Value) + val(ReportItems!Textbox80.Value)`

I hope this will help.

Many Thanks

Syed Qazafi Anjum

• Marked as answer by Tuesday, October 30, 2012 9:01 PM
Tuesday, October 30, 2012 8:24 PM

### All replies

• Hi Frahan1

Thanks for your posting. I think you can use report item collection to achieve this. For example the textbox name for the first sum is textboxSum1, the textbox name for the second sum is textboxSum2 and the textbox name for the third sum is textboxSum3.

So you can write the expression where you would like to take the sum of three like this

=ReportItems!textboxSum1.Value+ ReportItems!textboxSum2.Value+ ReportItems!textboxSum3.Value

`=ReportItems!textboxSum1.Value+ ReportItems!textboxSum2.Value+ ReportItems!textboxSum3.Value`

I hope this will help.

Many Thanks

Syed Qazafi Anjum

Tuesday, October 30, 2012 7:46 PM
• Hello Syed,

ReportItems!Catch3.Value + ReportItems!Textbox70.Value + ReportItems!Textbox80.Value

Report runs but i get an #Error

Catch3.value=100

Textbox70.Value =250

Textbox80.Value= 10

With the above expression i am trying to get total value of 360.00

FM

Tuesday, October 30, 2012 8:05 PM
• Try this:

`=CInt(ReportItems!Catch3.Value)+ CInt(ReportItems!Textbox70.Value)+ CInt(ReportItems!Textbox80.Value)`

Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com

Tuesday, October 30, 2012 8:19 PM
• Hello FM

Thanks for your posting. in the first data set can you please change the expression like this

Dataset 1
iif
(Sum(Fields!Hail.Value) is nothing , 0, Sum(Fields!Hail.Value))

please do not put quotes around 0.

=val(ReportItems!Catch3.Value) + val(ReportItems!Textbox70.Value) + val(ReportItems!Textbox80.Value)

`=val(ReportItems!Catch3.Value) + val(ReportItems!Textbox70.Value) + val(ReportItems!Textbox80.Value)`

I hope this will help.

Many Thanks

Syed Qazafi Anjum