Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inconsistent Page Header
Message
 
À
14/08/2003 10:41:46
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00820141
Message ID:
00820264
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
The issue with the page header not being printed with the summary information is a bug. If the details fill up the first page and there isn't room to fit the summary band, VFP goes to the next page. Unfortunately, it doesn't bother to print any page header or page footer.

In VFP 8, they didn't exactly fix the bug but they did give us a way to deal with it. There are two new checkboxes that allow us to indicate whether we want the Page Header printed with the summary and whether we want the Page Footer printed with the summary.

But .. I'm guessing that you aren't using VFP 8 and need a work-around for your version!! You have a couple of options, but neither of them are perfect.

Solution #1. Create a data group on Invoice Number. Create a report variable called rlFinished, set it to .f., and set it to reset at each Invoice Number. In the OnExit expression of the Group Footer, enter this:
_VFP.SetVar('rlFinished', .t.)
Add all the summary information to the Page Footer band and set the Print When logic of each field to "rlFinished".

The drawback to this solution is that the space required to print the page footer is reserved for each and every page .. not just the last page. This means you'll get less lines per page on page 1.


Solution #2. Create a Data Group on Invoice Number. Create a report variable that counts the number of lines in the Data Group. Put all your fields in the Group Footer and mark them all as float. At the very top of the group footer put an object with the following expression, mark it as stretch with overflow, and make it the width of the report:
REPLICATE(CHR(13), 99-rnLines)
The "99" represents the maximum number of lines that can fit on a page. The drawback to this option is that you cannot have anything within the detail band stretch or it completely throws this off. The other drawback is that you have to preprocess your data so that you can be sure you never have more than 14 lines in the group!

Like I said .. neither option is great .. but that's why they're called "workarounds"!!

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform