The REPORT command honors scope clauses, just as with browse. So if you have a parent table with workorder headers and a child table with workorder details, you can limit the report by using FOR or WHILE clauses. Here's an example using WHILE:
SELECT woheader
SET ORDER TO OrderNumber
SEEK MyOrderNumber
SELECT wodetail
SET ORDER TO OrderNumber
SEEK MyOrderNumber
REPORT FORM MyReport WHILE OrderNumber == MyOrderNumber TO PRINTER PROMPT PREVIEW
Hope this helps,
Cathy
>I am trying to move a legacy build FoxPro for Windows app to VFP6. This is an enterprise app that handles receiving, inventory management, workorders for p/u, delivery, and services, storage, and interfaces with Peachtree accounting for A/R. As a newbie to VFP, I will probably be asking this forum for advice quite often.
>
>I would like to know if Report Designer can be used to create work orders (as a one to many report) that will pull info from the currently open form that is being used to create the workorder and print only that workorder. Currently printing is handled by a .*prg where we are formatting the printing by line commands.
>
>Not all workorders are single page. The header and footer need to print only at the beginning and end of the print job with the work details in between.
>
>I began to visually format the report, and that is not a problem, but it just seemed that I might not be able to control this the way I need to.
>
>Thanks,
>Matthew