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

Problem with Running Total 1

Status
Not open for further replies.

gsmithmme

Technical User
Jun 3, 2004
51
US
I am using Crystal 8.5 on a Paradox database. I have running total that correctly counts the number of barcodes in the details. This is then used in a formula to display the total value of the number of barcodes. That formula is named @Test and is this:

If Isnull({hetype.Replacement}) then 0 else {hetype.Replacement}*{#TotalBarcodeType}

From that, I then have a running total calculation to give me subtotal of @test for the category of equipment.
This formula is @CatVal and is this:

shared currencyvar CatVal:=CatVal + {@TEST}

I have a reset calculation for cat val in the header.

The problem i am having is that for some reason, CatVal is adding the last record 2 times so cat val shows $50, then $100, then $200, but, when I try to show it in the subtotal, it displays $550.00 (50+100+200+200).

I can't figure out why it is doubling that last record.

Any help/ideas is appreciated.
Wriong_buj372.png
 
Are the the lines where you show the QTY, description, etc. the detail line or is it also a grouping. If is a grouping and there are 'hidden' detail lines (not sure where you put the @CatVal formula.
 
For the final display you should only have a separate formula like this:

Whileprintingrecords;
Shared currencyvar CatVal;

If you place your original formula in the footer, it will calculate again.

-LB
 
The Qty & Description etc, are in a grouping field. The detail is hidden as they don't want to see the individual records. As a test, I exposed the detail line, and there are no hidden detail lines.

I then took lbass's suggestion and created a new formula with the code. No luck. That field came up with the same information. ($464.00).

Any other ideas? Thank you so much. This is such a good community. :)
 
Did you remember to remove the original formula from the footer section?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top