I need to calculate part of the fields on the report..help

  • I'm trying to do this ( using sql server 2005 and SSRS)

    on the report I create a text box with this expression

    =IIF(Fields!CUPOFC.Value="LBO",SUM(FIELDS!INTPLTD.Value),nothing)

    I need to look for a value=LBO on field CUPOFC and if it's true sum field INTPLTD

    meaning at the end of the report need to look like this:

    total LBO = xxxxxxx.xx

    total C = xxxxxxx.xx

    total M = xxxxxxx.xx

    need help please URGENT

    thanks

  • hi,

    =sum(IIF(Fields!YearGroup.Value = "B", 1, 0))

    I have something like this. If value of yeargroup into table is 'B' then it will sum of every record.

    It depends if your second value is 1 or any number.

    it might help.

  • Thanks for the replay but that not help, I need to evaluate if the field="LBO" and then sum another field

    I need to show at the end of the report something like this:

    total LBO = xxxxxx.xx

    total L = xxxxxxx.xx

    total F = xxxxxx.xx

    any other idea?

    thanks

  • I have done this before in Reporting Services and I remember using a hidden textbox to store the value that I needed, trying to figure it out now again as it was quite a while ago.

    Another option is to calculate those values in your SQL query are return as columns and then just drop those values on your report.

  • Thanks, !!!! you gave me a good idea, I create a new dataset running a query to sum the fields and I put that result

    on the report. It works...thank you

Viewing 5 posts - 1 through 4 (of 4 total)

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