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!

Running Total using Evaluation Formula

Status
Not open for further replies.

jbhsuman

Technical User
Nov 11, 2003
68
US
I am trying to use a running total to count the number of invoices. The Invoice number can duplicated depending on the number of line items created for the invoice

example:

Inv Item Description
1 1 xyz
1 2 abc
1 3 def
2 1 ghi
2 2 mno
3 1 ghi

I need to evaluate the count once the invoice number changes. the forumla I used is
Code:
({DATA12.INVOICE} <> Next ({DATA12.INVOICE})and Month ({DATA12.DATE})= 12)
.

The formula works fine until I reach the last record. At the last record, the formula does not count the last record. I’ve tried the following variations with no success.

Code:
 ({DATA12.INVOICE} <> Next ({DATA12.INVOICE}) or NextIsNull ({DATA12.INVOICE}) and Month ({DATA12.DATE})= 12)

Code:
({DATA12.INVOICE} <> Previous ({DATA12.INVOICE})or NextIsNull ({DATA12.INVOICE})and Month ({DATA12.DATE})= 12)

Any suggestions?
 
BTW, I am using CR 9 and advantage DBF
 
In Crystal 8.5, the best way would be a running total with DistinctCount

Madawc Williams
East Anglia, Great Britain
 
TY Madawc. I didn't even think of that. Sometimes I think I try to make things more difficult than they need to be.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top