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

Running Total Problem

Status
Not open for further replies.

austin22

Technical User
Aug 6, 2007
66
US
Hello all!

I am using Crystal Report 8.5. I am having a problem retrieving the data I need. Here is my setup:

My report is grouped by Case Number

Running Total
Summarize {table.Transaction}
Type of Summary (sum)
Evaluate
On change of field {table.ReceiptNum}
Reset
On change of group {table.CaseNumber}

THEN to get a running total for each group:

onfirstrecord or
{table.ReceiptNum}<>previous({table.ReceiptNum}) or
{table.CaseNumber} <> previous({table.CaseNumber})

The problem I am having is this:
Code:
254
       254
216    470
399    470
356    826

I am not sure why 399 did not get counted. It is happening periodically throughout the report. Please advise.






 
We would have to see how this sample relates to the receipt number and case number, so please show a sample where both of these change, show the transaction amount, and show how the running total appears with them. Also, you described your running total and then added another set of clauses, without telling us where you built this in:

onfirstrecord or
{table.ReceiptNum}<>previous({table.ReceiptNum}) or
{table.CaseNumber} <> previous({table.CaseNumber})

-LB
 
Sure!
Code:
CaseNumber  ReceiptNumber   CaseTransaction

0000644331     372500           100.00
0000644331     372500           100.00
0000644331     372501           300.00
0000644331     372501           300.00

                 GroupFooter    400.00(RT1) 400.00(RT2)

0000644332     335852           100.00              
0000644332     335853           150.00      

                 GroupFooter    250.00      650.00

Etc...Etc...

The following is the first running total
Running Total
Summarize {table.Transaction}
Type of Summary (sum)
Evaluate
On change of field {table.ReceiptNum}
Reset
On change of group {table.CaseNumber}

This is the second clause:
Summarize
(table.Transaction)
Type of Summary
(sum)
Evaluate Using formula
onfirstrecord or
{table.ReceiptNum}<>previous({table.ReceiptNum}) or
{table.CaseNumber} <> previous({table.CaseNumber})
Reset
Never

RT means Running Total


When evaluating the second group of data may be skipped and then continue to count the next group. The example above is what I need to see. Please advise.
 
That's a fine sample, but what we need to see how it is currently behaving.

-LB
 
I do apologize...please see below

Code:
CaseNumber  ReceiptNumber   CaseTransaction

0000644331     372500           100.00
0000644331     372500           100.00
0000644331     372501           300.00
0000644331     372501           300.00

                 GroupFooter    400.00(RT1) 400.00(RT2)

0000644332     335852           100.00              
0000644332     335853           150.00      

                 GroupFooter    250.00      650.00

0000644333     454524           100.00

                 GroupFooter                650.00

0000644334     454526           200.00

                 GroupFooter                850.00

Notice that the 100.00 did not get counted.


Etc...Etc...
 
Your formula should work perfectly--if it is written exactly as shown. I remember in 8.0 there was a problem with running totals that was corrected in a service pack. I would try that next.

-LB
 
Okay, I have another dilemma. Same scernoria as above, but I want to do the following:

Code:
CaseNumber  ReceiptNumber   CaseTransaction       PayType

0000644331     372500           100.00              JC
0000644331     372500           100.00              JC
0000644331     372501           300.00              CV
0000644331     372501           300.00              CV

                 GroupFooter    400.00           300.00

0000644332     335852           100.00             JC 0000644332     335853           150.00             CA 

                 GroupFooter    250.00           450.00

How will I write this to count the total of transaction, but eliminate the payment type 'JC' in my 2nd running total. Please advise.
 
(
onfirstrecord or
{table.ReceiptNum}<>previous({table.ReceiptNum}) or
{table.CaseNumber} <> previous({table.CaseNumber})
) and
{table.paytype} <> "JC"

Does this account for the previous problem--did you actually have that additional criterion built into the running total originally?

-LB
 
Thank you so much. That worked!
To answer your question...no, this does not account for the previous problem. The report still skips calculating some transactions periodically. I am not sure how to fix that problem.

Thanks again.
 
Yes! The service pack worked.

Thank you so much for your help.

-austin22
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top