none
Format a Field in a Report RRS feed

  • Question

  • I am trying something and I get an error in the field of the report. As said in another different post, I am trying to create a generic report.
    What I am wanting to do is to pass a parameter and evaluate it, then format the field according to the parameter value. I tried this

    =iif(Parameters!A2.Value=

    "IsCurrency",FormatCurrency(CDbl(Fields!A2.Value),2),iif(Parameters!A2.Value="IsDate",Format(CDate(Fields!A2.Value),"MM/dd/yyyy"),Fields!A2.Value))

    When I run the report, I get the value Error in the field. If I take out one of the iif statements its fine.

    Can you not call different format options in an expression?

    Davids LEarning

    Friday, March 5, 2010 6:05 PM

All replies