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

ADDING TWO RUNNING TOTALS

Status
Not open for further replies.

Lancedac

MIS
Apr 6, 2003
14
US
Hi guys:

The detail section of invoices in my Accpac database looks like this:

Inv#001
Detail Type Item# Amt
Item Prod1 100
Miscellaneous Freight 20
Miscellaneous Other 10
Miscellaneous Deposit -50
Values in the Amt. field are stored in the field OEINVD.Extinmisc. Now I want to create a report showing like this:

Inv SubTotal Misc.Charge Deposit Tax Balance
001 100 30 -50 10 90

I am using running totals to break out the Misc. item type into Misc. Charge and Deposits. The 2 running totals are in the group footer section (grouped by Inv number). They work well. However, When I try to calculate the BALANCE as shown above, it only calculates if there is a value in both running totals fields.Ie Misc.Charge & Deposit. If one is blank, Balance prints blank as well. What am I missing? Thanks for any help.
 
The tables aren't designed the way you describe, that sounds like the details section of a report in Accpac.

How did you "When I try to calculate the BALANCE as shown above"?

You might place something like the following in the report:

(
if isnull({#total1}) then
0
else
{total#1}
)
+
(
if isnull({#total2}) then
0
else
{total#2}
)

-k
 
Yep. Thanks Bro that approach worked. Will have to work on understanding why it had to be done like that though, I was simply doing #RT1 + #RT2. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top