Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting group headers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00762349
Message ID:
00763031
Vues:
19
You're very welcome. I usually get a few raised eyebrows from people when I tell them to create a report variable with a value of zero and mark it as SUM. They look at me like I'm a little crazy!! But this works great for situations like these!!

Cathy


>Hey Cathy,
>
>Okay, I see the error of my ways.
>
>The problem is I did not choose SUM on the variable, so then I resorted to using a variable that was created before the report was run. That method does not work in preview...the variable keeps getting bigger and bigger. Then I came up with the other way of doing it, which does work.
>
>Thanks for the info.
>
>>Hi Steve,
>>
>>Yes, this works just fine when previewing, even if you navigate back and forth between pages. Whenever you go to a preview page, the report writer actually starts over so the variable will get reset and recalculated properly.
>>
>>What usually trips people up is that they put the incrementing code in the Group Header and not the Group Footer. In cases where the Group Header repeats on pages that overflow, the counter gets incremented a second time. That's where the trouble begins. This is why I always put the counter increment in the Group Footer because that only gets processed once for each Group regardless of how many pages the group stretched across.
>>
>>Cathy
>>
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
Répondre
Fil
Voir

Click here to load this message in the networking platform