Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with printing multiple child records
Message
 
To
27/02/2001 19:58:23
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00480334
Message ID:
00480377
Views:
7
Randy,
Welcome to VFP and UT!

Reports don't handle parent/child relationships well. The easiest way (as others said) is to make a single report cursor which holds all the data you want. Because both parent and child data are included on each record the report won't have to worry about relations, set skip etc. You can make a read-only cursor on your form just before you call the REPORT command. Just be sure the cursor is selected. I rarely use the report DataSession because I've found it easier to keep all data-handling code on the forms. If a report is to be called from various forms or menus you can put this code into a library or into a PRG procedure file.

When you finish the report you can either explicitly close the cursor with "USE IN MYCURSOR" or wait until the form closes when the cursor will close automatically. I prefer the former, as there are no problems when I run the report again.

HTH
Barbara

>Hi. I have a form that has a print button. I want to print the current record.
>I put: REPORT FORM myreport TO PRINT NEXT 1, but it only printed 1 child record.
>I even tried: SET SKIP TO child_dbf before my print command, to no avail.
>
>I hear the preferred way is a private environment in the report wirter. BUT how do would you set the record pointer??
>
>Thanks, Randy
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform