Syntax for an IF statement

edited 6:47PM in FastReport .NET
I am using the FastReports .Net version and Visual Studio 2015.

I am trying to enter an IIF statement in a textbox on the Data Band on my Fast Report. I have tried the following syntax, but I am getting an error.

[IIF([Cost]>0, "X"," ")]

I get the following error: Error BC30452: Operator '>' is not defined for types 'FastReport.TextObject' and 'Integer'.


What am I doing wrong? What is the proper syntax to use in the TextBox that is located in the Data Band on the report.

Thank you
BobV365

Comments

  • edited 6:47PM
    Compiler error, if you are trying to compare object. Make sure [cost] is from datasource and proper datatype which is support operator >

Leave a Comment