locked
SubTotals and Totals in Report RRS feed

  • 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

Answers

  • 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.

    please also try this expression

     

    =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

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful


    • Marked as answer by Farhan1 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.

    Please change these name of textboxes according to your name

    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

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful

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

    Heres the expression i used with your advice

    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.

    please also try this expression

     

    =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

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful


    • Marked as answer by Farhan1 Tuesday, October 30, 2012 9:01 PM
    Tuesday, October 30, 2012 8:24 PM
  • Thank you Syed It works.. Thank you for the suggestion on 0  and ShahFiasal Muhammad Thank you for your suggestion as well but it didnt worked :(

    FM

    Tuesday, October 30, 2012 9:01 PM