IIF function

Hi

I have a field in my report where I want to display text if the value of a database field is "Yes" and display nothing if it is not "Yes"

I've entered this:

[IIF([frxDBDataset2."Sold"] = "Yes","Sale Date:"," " )]

I've tried double equals, changing double quotes to single, and so on but I always get this error message "Identifier expected".

Can anyone tell me what I'm doing wrong?

Thanks

Andy

Comments

  • Fixed by changing to:

    [IIF(<frxDBDataset2."Sold"> = 'Yes','Sale Date:','' )]

    What I'm puzzled by is I used the Report editor to build my expression and it inserted [frxDBDataset2."Sold"] into the IIF statement when <frxDBDataset2."Sold"> was needed.

    Surely the editor should insert the right syntax?

    Andy

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.