Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report from two cursors
Message
 
To
30/03/2005 07:52:35
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00999894
Message ID:
00999922
Views:
36
The simple answer is to upgrade to VFP 9 because it has the ability to do Multiple Detail bands built right into it.

If that's not an option, you have to follow Cetin's advice and merge the two tables into one table with a new field called RECTYPE that identifies which table it came from. Then add all the items for the first detail band to the report and set the Print When logic to only print for the first type. Then add all the fields for the second detail band and set the Print When logic. This gets very messy and ugly because you have to put the fields for the second band on top of the fields for the first band and it makes it a nightmare to maintain down the road.

If you are new to reports, I suggest you get my book, The Visual FoxPro Report Writer: Pushing it to the Limit and Beyond, from Hentzenwerke Publishing. It is full of information on how to get the most out of the report writer. It also gives a detailed explanation of how to do this exact scenario.

If you are able to upgrade to VFP 9, you can also get two articles for free from the MSDN website that explain all the new features. There is also a new book from Hentzenwerke called "What's New in 9" and it has a few chapters on the report writer.



>Hello Everybody !
>
>report generator for beginners ????
>
>I have two cursors as resultsets from two different sql-select commands !
>(two different databases on different servers)
>simpified example
>
>cursor a:
>custno, custname, ..., contactno, contactname
>
>cursor b:
>custno, custname,... , orderno, ordername
>
>i want to produce a report witch looks like this:
>
>top of page:
>custno custname .........
>
>detail:
>all contacts:
>contactno, contactname
>contactno, contactname
>contactno, contactname
>contactno, contactname
>contactno, contactname
>contactno, contactname
>
>all orders:
>orderno, ordername
>orderno, ordername
>orderno, ordername
>orderno, ordername
>orderno, ordername
>
>end of report:
>6 contacts
>5 orders
>
>
>i don't know how to programm this detail part ??
>
>first all records from cursor a
>then all records from cursor b
>
>Any help welcomed
>Best regards
>Albert
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