Search code examples
visual-studio-2010rdlcms-reports

RDLC Reporting with DataSets on Visual Studio 2010


    : Facility Type : Amount : Purpose :
    : ------------- : ------ : ------- :
    : Cash Credit** :        :         :
    ------------------------------------
    : Loan          :        :         :
    ------------------------------------
    : Other         :        :         :
    ------------------------------------

This is the table in RDLC report. I have table similar table in database with ID column.

    : ID            : Amount : Purpose   :
    : ------------- : ------ : -------   :
    : 1             : 100000 : home loan :
    ------------------------------------ :
    : 2             : 200000 : car       :
    ------------------------------------ :
    : 3             : 30000  : office    :
    ------------------------------------

I have to map database table in RDLC table.

I tried expression for Cash credit Amount

=IIF(Fields!ID.Value=1,Fields!Amount.Value,"empty")  "Working"

I am trying expression for Loan Amount

=IIF(Fields!ID.Value=2,Fields!Amount.Value,"empty")  "Not Working", value - "empty"

Similarly for other

What expression i have to use For Facility type - Loan, Amount


Solution

  • If you have ONLY 3 Facility Types with ID values 1,2,3 then try this

    =IIF(Fields!ID.Value=1, Fields!ID.Value, IIF(Fields!ID.Value=2, Fields!ID.Value, IIF(Fields.ID.Value=3, Fields!ID.Value, "empty")))