Syntax for an IF statement

edited 10:00AM 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 10:00AM
    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

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.