How to use IIF function

edited 11:46PM in FastReport 4.0
We are trying to use the IIF function in a report, to set string contents as follows:

IIF([DatasetName."FieldName"]=1,'true','false')

this produces the error "Identifier expected" - what are we doing wrong?

Thanks

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:46PM
    the iif function is for use inside a memoview
    IIF([DatasetName."FieldName"]=1,'true','false') bad syntax
    [IIF(<DatasetName."FieldName"> =1,'true','false')]


  • edited 11:46PM
    Changing the syntax from [DatasetName."FieldName"] to <DatasetName."FieldName"> still did not work, although it changed the error message from "Identifier expected" to " ')' expected ". However when we changed the script language from C++ Script to Pascal Script your syntax works fine. Why would that be, is there something else we can do to make it work while using C++ script?

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.