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

Formula will NOT Calculate

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I have a formula called @MiscCharges and this returns the proper values in the Details section. However, when I try to include this formula within another formula to obtain a @TOTAL ((@Amount)+ @MiscCharges), the @MiscCharges values is not being included. The formula for the @MiscCharages is:
if isnull({Invoice_Detail.Invoice_Detail})
then {Invoice_Header.Orig_Invoice_Amt}
else if not isnull({Invoice_Detail.Invoice_Detail}) and {Invoice_Detail.Source_Type} in [0,1,2]
then
Round({Invoice_Detail.Prepaid_Amt}*-1/ 1,2)
else if not isnull({Invoice_Detail.Invoice_Detail}) and {Invoice_Detail.Source_Type} in [3]
Then Round({Invoice_Detail.Prepaid_Amt}*-1/ 1,2) + Round({Invoice_Detail.Prepaid_Amt}*-1/1,2)
else if not isnull({Invoice_Detail.Invoice_Detail}) and {Invoice_Detail.Source_Type} in [4,5]
Then Round({Invoice_Detail.Prepaid_Amt}*-1/ 1,2)

I'm a bit stumped, and thanks for any feedback!
 
Where are you placing the {@Total} formula? What is the content of {@Amount}?

-LB
 
It is placed in the Details section. The Formula for @Amount is:
Select {Invoice_Detail.Source_Type}
Case 0,1,2:
Round({Invoice_Detail.Amount}/1,2)
Case 3,4,5:
0
 
What do you see if you place {@Amount} in the detail section by itself? What is the point of dividing the amount by itself?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top