Search code examples
visual-studio-2008reporting-servicesdesignerexpression

How to sum values in Reporting Services via Visual Studio 2008 Expression Designer?


I have a report like this

person | lead count | support count | ...
p1     | 10         | 20            | ...
p2     | 20         | 30            | ...

I need to have sum of counts in one column. I've tried this expression: =Sum(IIf(ISNOTHING(Fields!lead_count.Value) Or Fields!lead_count.Value = "", 0, Fields!lead_count.Value))

but it gives me #Error, aswell as trying: =Sum(IIf(ISNOTHING(Fields!lead_count.Value) Or Fields!lead_count.Value = "", 0, Int(Fields!lead_count.Value)))

Any ideas what I am doing wrong and how to get proper sum of counts (30 for lead, 50 for support)?


Solution

  • I think you can use the SUM directly:

    =Sum(Fields!lead_count.Value)
    

    No need to check blank values.