Nagham
February 16th, 2007, 02:37 AM
I have a column in my crystal report(of VB.Net 2005),this column is a Balance where there's fo example '1000 C' or '1000D' in the page footer I want the sum of this column,since it's type is string because of the letters Cr and Db I created a formula,named SumBalance:
numberVar SumBalance;
SumBalance:=0;
whilereadingrecords;
if Right({StatOfAcc.Balance}, 1)="C" then
SumBalance=SumBalance-ToNumber(Left ({StatOfAcc.Balance},Length ({StatOfAcc.Balance})-2 ))
else
SumBalance= +ToNumber(Left ({StatOfAcc.Balance},Length ({StatOfAcc.Balance}) -2));
I had put this formula in the page footer it gave me False,and if I right click,
FormatObject,I find a tab Boolean,where did I specify that my formula is a boolean....Wher's my error...Plz Tell me
numberVar SumBalance;
SumBalance:=0;
whilereadingrecords;
if Right({StatOfAcc.Balance}, 1)="C" then
SumBalance=SumBalance-ToNumber(Left ({StatOfAcc.Balance},Length ({StatOfAcc.Balance})-2 ))
else
SumBalance= +ToNumber(Left ({StatOfAcc.Balance},Length ({StatOfAcc.Balance}) -2));
I had put this formula in the page footer it gave me False,and if I right click,
FormatObject,I find a tab Boolean,where did I specify that my formula is a boolean....Wher's my error...Plz Tell me