Fast Report Conditional Highlight

I have tried to follow the Condition highlight in the User Manual but I am getting the following error when I type in the condition:
[Data.JanuaryAchieved] >0 though Data.JanuaryTarget is of type System.32.

How can I create multiple conditions. For example if a value is below 4 then Red, else if between 4 and 6 then Orange else Green when above 6.


System.Exception: Text24: Error in highlight condition: [Data.JanuaryAchieved] >0 ---> System.InvalidCastException: Specified cast is not valid.
at FastReport.ReportScript.CalcExpression(String expression, Variant Value)
--- End of inner exception stack trace ---
at FastReport.TextObject.GetData()
at FastReport.BandBase.GetData()
at FastReport.Engine.ReportEngine.PrepareBand(BandBase band, Boolean getData)
at FastReport.Engine.ReportEngine.ShowBandToPreparedPages(BandBase band, Boolean getData)
at FastReport.Engine.ReportEngine.ShowBand(BandBase band, Boolean getData)
at FastReport.Engine.ReportEngine.ShowDataBand(DataBand dataBand, Int32 rowCount)
at FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand, Int32 rowCount, Boolean keepFirstRow, Boolean keepLastRow)
at FastReport.Engine.ReportEngine.ShowGroupTree(GroupTreeItem root)
at FastReport.Engine.ReportEngine.ShowGroupTree(GroupTreeItem root)
at FastReport.Engine.ReportEngine.RunGroup(GroupHeaderBand groupBand)
at FastReport.Engine.ReportEngine.RunBands(BandCollection bands)
at FastReport.Engine.ReportEngine.RunReportPage(ReportPage page)
at FastReport.Engine.ReportEngine.RunReportPages()
at FastReport.Engine.ReportEngine.RunReportPages(ReportPage page)
at FastReport.Engine.ReportEngine.Run(Boolean runDialogs, Boolean append, Boolean resetDataState, ReportPage page)
at FastReport.Report.Prepare(Boolean append)
at FastReport.Design.ReportTab.Preview()

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.