fastreport C++ Script IFF add unwanted data on charts

edited April 2015 in FastReport 4.0
i'm working on FastReport 4, trying to add charts

i'm receiving data from Database in the data there is a column call "PayType",

i want to add condition if the PayType==1 then add data to the chart else do nothing , the statement i'm using to do that is "IFF" ,but it force me to add 2nd condition (as else ) the thing that add wrong values to the chart . my statment is :
wrote:
(IIF(<MonthlyMovementOfMat_Report."PayType">==0,<MonthlyMovementOfMat_Report."PeriodEndDate">,"Null" ))//Here is the problem it adds null string !

(IIF(<MonthlyMovementOfMat_Report."PayType">==0,<MonthlyMovementOfMat_Report."Quantity">,"")) //if condition 1 is false it add 0 value !



the question is : Is there any way to do if statement without else in the FastReport ? like if (condition 1) {do the work } else do nothing !

all regards .

Comments

  • edited April 2015
    The first thing that came to mind is that if you want to ignore something, the easiest way is to exclude it from your data in the first place (Select * from <table> where PayType = 0)

Leave a Comment