Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Re: SummarySettings Formula
posted

Hi,

i have got an wingrid in which i need to show the summary of all the rows, but one of the columns is  a calculated column in which even the summary needs to be calculated ..

i would like to check for the divide by zero exception ..

 is there anyway by which i can check before i assign the formula

basically at the moment i am Doing --

summaryPercentageAppliedForReceived.Formula = "Sum([" + _applliedForAmountLabel + "]) / " + "Sum([" + _ReceivedAmountLabel + "])" ;

but this will work as long as the "Sum([" + _ReceivedAmountLabel + "])" is greater than zero . else it will disaply something Like NaN

so what i am looking for is something like

 if ( "Sum([" + _ReceivedAmountLabel + "])"  > 0)

{

"Sum([" + _applliedForAmountLabel + "]) / " + "Sum([" + _ReceivedAmountLabel + "])" ;

}

else

{

" 0 ";

}

can you please let me know if there is any other way i can do this.

thank you for your help in advance,