Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to duplicate a feature of 8.0 in 6.0
Message
 
À
15/02/2004 16:07:11
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00876485
Message ID:
00877960
Vues:
15
> I'm still not sure how it works, but thank you, your suggestions worked perfectly. Maybe when you have a moement you can explain it if you like. Thanks again for taking the time.
>
>Carmen

I'd be happy to try to explain it.

First, I had you create a report variable called rlLastPage and set the value to .f. As every detail band was processed, the report writer just reset this value to .f. again. Thus, it never really changed while processing all the detail bands.

Next, I had you create a Data Group with .t. as the expression. What this did was "wrap" the entire report in a Data Group. The expression, which is .t., is evaluated before printing each and every detail band. Because you hard-coded the expression to a constant value of ".t.", it never changed. This means the Data Group header was triggered once at the very beginning of the report and the Data Group footer was triggered once at the very end of the report when it was done with all the detail bands.

Next, I had you use the following in the OnExit expression of the Data Group's Footer.

_VFP.SetVar('rlLastPage', .t.)

What this does is set the value of rlLastPage to .t. when the Data Group Footer is processed. As I just described about, the Data Group Footer gets triggered one final time after all the detail bands are processed. So in essence, you know you are done with the details so set this value to .t.

The final step I had you do is change your print when logic to "rlLastPage" in the Page Footer. Throughout most of the report, this value is set to .f. so these items never print. Once all the detail bands are done, and the Data Group Footer is triggered, this variable gets set to .t. This Data Group Footer is processed BEFORE the Page Footer so when you get down to the Page Footer, the value is now .t. on the final page.

I hope this clarifies!!
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