How to use IIF function

edited 10:37PM 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 10:37PM
    the iif function is for use inside a memoview
    IIF([DatasetName."FieldName"]=1,'true','false') bad syntax
    [IIF(<DatasetName."FieldName"> =1,'true','false')]


  • edited 10:37PM
    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