Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detail band to long - duplex report
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00508098
Message ID:
00508458
Vues:
20
>Hi
>
>I am doing a duplex report and the height of the report is more than a page length because it is for 2 pages and I am getting "detail band to long", any suggestions? By the way this was fine in 2.6, it did not check for the length of the total report, what happened?


Moshe,

In the February issue of FoxTalk, I explained exactly how to do this. Here's the section of text from that article.

Hope it helps,
Cathy

--------------------------------------------
SPANNING A DETAIL BAND ACROSS MULTIPLE PAGES

Start by creating a temporary table or cursor that contains multiple records for each record in your source table. For example, if you want to print two detail pages for each record and your source table contains six records, your new table should have twelve records in it (2 x 6) to achieve the final result of twelve printed pages. The new cursor should have an additional field named REC_TYPE added to the structure and the sort order should be your desired sort field followed by the REC_TYPE field. The following code shows how to create the new cursor (it assumes the first field in my table is what I want to sort on).

* Create the temporary cursor
SELECT '1' AS rec_type, * FROM spanning ;
UNION ;
SELECT '2' AS rec_type, * FROM spanning ;
INTO CURSOR tmpcurs ;
ORDER BY 2, 1

In the Report Writer, change the height of the detail band to accommodate almost a full page. I say “almost”, because you have to leave room for any title, header, footer, group or summary bands that also exist on your report. Make sure that the height of ALL bands does not exceed the page length.
Add all the fields you want on the “first” page to the detail band, making sure to set the “Print When” logic to REC_TYPE = ‘1’. Then add all the fields you want on the “second” page to the detail band, making sure to set the “Print When” logic to REC_TYPE = ‘2’. Again, I suggest you use the same “dummy report” technique previously mentioned to save yourself from going cross-eyed and pulling all your hair out. Once this is done, you’re ready to go. Run the report and you’ll see your data divided between two pages for each transaction in the original file.
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