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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing Up

Status
Not open for further replies.

macktruck

Programmer
Sep 17, 2010
22
0
0
KE
Dear Experts,

I have two formulars with me :

The first being

1.
Code:
Global numbervar money;

IF {@BPCurrency} <> 'KES' or {@BPCurrency} <> 'EUR'  then

Global numbervar money:= {ConsStatement.Win_FCDeb}

else if {@BPCurrency} = 'KES' or {@BPCurrency} = 'EUR' then

Global numbervar money:= {ConsStatement.Win_SysDeb}

The second being

2.

Code:
if {OINV.CurSource} = 'L'
        then {INV1.LineTotal}
 else if {OINV.CurSource} = 'S'
        then {INV1.TotalSumSy}
 else if {OINV.CurSource} = 'C'
        then {INV1.TotalFrgn}

When I try to sum up the first, it does not appear in the list of fields or formulas that can be summed up however the second can be summed up without a problem

There is no difference between them as they are all numerical. What can i do to have the first field name summed up ?
 
If you have "whileprintingrecords" at the beginning of the first formula, remove it. Why are you using a variable here?

What is the content of {@BPCurrency}?

-LB
 
Hi Lbass,

The BPCurrency is a shared variable from a subreport. I realised this is causing the problem as crystal cannot sum up such. I removed this and the whileprintingrecords and I can now sum up. Thank you for pointing me to the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top