Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print check stub 2x (print detail twice)
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01165954
Message ID:
01166107
Views:
19
You have a few options ...

#1 - Create a cursor that has two sets of detail lines with another extra field called StubNo so you can do a data group on Check Number and another one on Check Number + Stub Number. The check itself goes in the data group header for Check Number. The data group header and footer for Stub Number is used to fudge the spacing for the two stubs. When building this cursor you have to put dummy lines to fill up the stub with exactly the right number of lines. You also have to take great care to deal with a check that might overflow to a 2nd page.

#2 - (This is the method that I describe in my book). Create one giant record with all the check information and stub information. For example, if the stub contains up to 10 lines of invoice information you would have fields named Date1, Date2, Date3... Date10, InvNo1, InvNo2, InvNo3...InvNo10, Amt1, Amt2... Amt10. And so on and so on. In the report definition you basically make one giant detail band as tall as the page (or as close as possible). Then you add all the fields stacked on top of each in the stub area .. Date1, Date2, etc.

#3 - Upgrade to VFP 9 and you could do this with a report listener. Use a directive in the report definition for all the stub fields. In the Render method of the listener, have it render the stub object twice .. once where it's defined and a second time using an offset to print it farther down the page.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform