Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in Formula

Status
Not open for further replies.

Lnxvas

Programmer
Oct 15, 2008
15
0
0
US
HI,I am using crystalreport2008.I am new to CR.
I want to total the feilds in the report and some feilds have no values.i created a formula by adding all the feilds(both which have values and which don't).it doesn't give me any output.but when i add only the feilds which have value then i will get the output.this how report is...

description amount
--------------- --------------
Sch charge 12345.90
trs Charge 9876.00
Sch2 charge 4519.00
sch11 charge
TOTAL

i need the total of amount and i used this formula...
{Command.trs} + {Command_2.Sch} + {Command_3.Sch2} + {Command_4.Sch11}
this not showing the out put..this is the simple caluclation..but unable to find out what is wrong..
can anyone help?

thanks,
 
i really don't understand what mistake i am doing here.should i use any other conditional formula? i know the calucation should be easy.i am stuck can anyone help?

Thanks
 
(
if isnull({Command.trs}) then
0 else
{Command.trs}
) +
(
if isnull({Command_2.Sch}) then
0 else
{Command_2.Sch}
) +
(
if isnull({Command_3.Sch2}) then
0 else
{Command_3.Sch2}
) +
(
if isnull({Command_4.Sch11}) then
0 else
{Command_4.Sch11}
)

-LB
 
Thank you,it worked...but i have another issue when i use this formula the total will be 0 though the feilds have no values.

What i want is if the feilds have no value then it should be empty in display(in report)total. if there is a value then only the total appears.

Can this be possible?

Thanks,
 
Right click on the formula->format field->numbers->customize->check "suppress if zero."

-LB
 
Thank you very much for quick reply.it worked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top