Simple Addition in an Expression... Can''t They All Just Get Along?????

  • OK... Let me seed your thoughts first.  3 datasets running basically the same code.  In each data set I declare an int variable to hold a value which reflects a number of units shipped.  Each dataset is reporting on units shipped form 7 different plants.  BUT.... on one plant, Baltimore, they have three different genres of product, so for the 1st dataset I am returning a value called AltBAL, and for the 2nd dataset I am returning a value called BradBAL,and for the 3rd dataset I am returning a value called CoreBAL.

    I need to add these three together and show them at the end of the report.  I have this in the expression:

    = Fields!ALTBAL.Value + Fields!BRADBAL.Value + Fields!CoreBAL.Value

    The result when the report is run is not throwing an error... the report runs, but in the field where I should see the SUM of the values, I only see the value "#Error".

    Anyone got an idea of what I need to do?  Can you add values together that are from 3 different datasets?

    Much appreciation for anyone that can help!

    Thanks,

     

    Mark

  • This was removed by the editor as SPAM

  • You might be able to get the result you want by refering to the report items collection. If you can put each of the subtotals into a text box on the report, turn off the visible property and then in the expression editor use  =ReportItems!txtBoxName.Value + ReportItems!txtBoxTwoName.Value + ReportItems!txtBoxThreeName.Value

     

    This may get you the reult you want.

     

    Stuart

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply