Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Previewing problems - group totals wrong
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00698523
Message ID:
00699491
Vues:
16
This message has been marked as the solution to the initial question of the thread.
I haven't been following this thread 100% so forgive me if I'm confused on the problem. Are you saying that you call a UDF in your detail band that adds some totals to a variable or cursor or something and the problem is that as you jump through the report, the totals get messed up?

- First ... can you use Report variables instead of calling the UDF?

- Second ... If you can't use a report variable .. do this: Add a call to a UDF in the On Entry expression of the Title band of the report. In that UDF, clear the variables or cursors or whatever it is that you are building.

Whenever you go backwards through a report .. it actually starts over with the report and reprocesses everything from the beginning. Therefore, if you are only resetting your variables or cursor in a program before calling the report .. then as you preview through the report and skip backwards, the variables don't get reset. Adding a call to a UDF in the Title band ensures that the variables and/or cursor gets reset whenever you happen to go backwards through the report.

Cathy



>Hi Sergey:
>I suppose so. It rankles me that what is a relatively straight forward multi-level report without using the report designer is very messy when using it. It has become a case of the tail wagging the dog if I want to replicate the old report. In as much as maintainability of code is high on my prioirties I'm thinking of dumbing down the report to a level the report designer can handle without me having to stand the program on it's head.
>
>In this case it seems to be a case of how can I keep a UDF called on each line item from executing every time the line is displayed while previewing the report. Without setting all sorts of switches and comparing previous to current report control breaks I don't see any way to do this.
>
>Thanks for the feedback,
>Scott
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform