none
Counting occurences of row value for Report Footer - PLEASE HELP! RRS feed

  • Question

  • I have a simple RDLC report which uses a table in the report body.  Data is in standard column form as follows:


    Make    Model    Year     ..........
    ------  -------  -------
    Dodge   Jeep     1989
    Warning - Inventory < 3

    Dodge   Jeep     1990
    Error - Inventory < 1

    Total Errors: 1
    Total Warnings: 1

    In my report dataset I have a status field with values ((E)rror or (W)arning) and a status message field containing the error/warning message. I use these fields to display the warning or error message on each detail line as shown in my simple report by using:
    =iif(Fields!Status.Value = "E", "ERROR - " & Fields!StatusMessage.Value, "WARNING - " & Fields!VerifiedMessage.Value)

    Now I need to display total errors and total warnings shown in my report footer but have been unable to count occurrences of each.  In the report footer I have tried expressions such as =Count(Fields!Status.Value = "W", "table1") where table1 is the name of my table in the report body but this displays a total of all detail records when I need it to display the total Warnings only.

    Thanks in advance.
    • Edited by HarpDog Friday, July 4, 2008 3:31 PM Need answer
    Thursday, July 3, 2008 5:57 PM

All replies

  • Try this for errors:

    =Sum(iif(Fields!Status.Value = "E", 1, 0), "table1")

    And this for warnings:

    =Sum(iif(Fields!Status.Value = "W", 1, 0), "table1")

    C.
    Friday, July 4, 2008 3:52 PM