Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrambled Groups
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01340458
Message ID:
01340730
Vues:
14
>My report has 2 groups. There is one inside group where the details run to the end of the page and the group footer is on the following page. The problem is that the group header for the following group prints ahead of the group footer for the first group.
>
>Does anyone know how to fix this?
>Thanks.

You have stumbled onto a known bug (and one that really ticks me off!!). If the group header is marked to reprint on subsequent pages .. it does .. but the report writer has incorrectly moved the record pointer to the next record so any data you try to print from the table/cursor is the wrong information. The workaround is to create report variables for each field you want to print in the group header. However, you can't just print the report variables because the first time the group header prints, the report variables haven't been set yet because the first detail band hasn't been processed yet and that's when the report variables get set. So you have to pull further tricks by counting the records printed for a group and printing the table data for the first time .. and then the report variable for subsequent times in the group header using IIF(firsttime, table.field, reportvariable) ... or separate fields with print when logic.

Read my blog here:
http://cathypountney.blogspot.com/2007/12/gotcha-workaround-for-data-group-bug.html
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