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

Comments

  • edited 6:31PM
    Hello,

    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))

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.