Expression with IIF conditin in New Column in FastReport.Net
I want to add new column for add new calculation in each row.
if( animal =="B") then perform following calculation
(5.4*10)/100
else if(animal=="C") then perform following calucation
((2/3)*8.5+7.5)*(10*1.03)/100
How can I write in new Report column???
Is support If... else.. condition in FastReport.Net
If not then plese give me IIF condition...
I used C# Visual Studio 2005 .net version...
Thank you
Manish
if( animal =="B") then perform following calculation
(5.4*10)/100
else if(animal=="C") then perform following calucation
((2/3)*8.5+7.5)*(10*1.03)/100
How can I write in new Report column???
Is support If... else.. condition in FastReport.Net
If not then plese give me IIF condition...
I used C# Visual Studio 2005 .net version...
Thank you
Manish
Comments
You may use either "?" operator or IIf function.
animal == "B" ? (5.4*10)/100 : (animal == "C" ? ((2/3)*8.5+7.5)*(10*1.03)/100 : 0)
IIf(animal == "B", (5.4*10)/100, IIf(animal == "C", ((2/3)*8.5+7.5)*(10*1.03)/100, 0))