Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Problem with Running Total

Problem with Running Total

Problem with Running Total

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.

RE: Problem with Running Total

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.

RE: Problem with Running Total

For the final display you should only have a separate formula like this:

Shared currencyvar CatVal;

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


RE: Problem with Running Total

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. :)

RE: Problem with Running Total

Did you remember to remove the original formula from the footer section?


RE: Problem with Running Total

lbass... You are a star! Thank you!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close