Conditional Statements in Crystal Reports
-
Hi Friends, I am trying to load the dataset to populate my crystal report. While getting data i am using a formulae to calculate a profit margin here if any column has zero i have bypass the formulae calculation as it return some error. how to use conditional statements inside the Formulae like this if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 so please help...:confused: Thanks in Advance. Barathan.K barathank@gmail.com
-
Hi Friends, I am trying to load the dataset to populate my crystal report. While getting data i am using a formulae to calculate a profit margin here if any column has zero i have bypass the formulae calculation as it return some error. how to use conditional statements inside the Formulae like this if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 so please help...:confused: Thanks in Advance. Barathan.K barathank@gmail.com
Barathan wrote: if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 The only thing I notice is you are missing the then keyword.
if @Sale <> 0 and @Cost <> 0 then
({@Sale} / {@Cost} - (1/100) * 100) * 100Michael CP Blog [^] Development Blog [^]
-
Barathan wrote: if @Sale <> 0 and @Cost <> 0 ({@Sale} / {@Cost} - (1/100) * 100) * 100 The only thing I notice is you are missing the then keyword.
if @Sale <> 0 and @Cost <> 0 then
({@Sale} / {@Cost} - (1/100) * 100) * 100Michael CP Blog [^] Development Blog [^]
thanks that works great:laugh: with regards, Barathan.K Barathan.K barathank@gmail.com