>Hi,
> I am trying to generate Invoice reports. From the foxpro samples, one way of accomplishing this is: In the reports data environment, override the BeforeOpenTables method and call the form which gets the input values for the parameterized view (based on which report is generated) and kick on the report.
>My question is, if the user clicks cancel on the input form, how can the code in BeforeOpenTables method stop the report generation process?
>
>Thanks
>Puri
Puri,
When you design the report you can choose to include the table name with your fields are not. If you DON'T, then the report will use the active table or cursor when you call it (assuming nothing in the report DE).
My preference is to prepare a cursor in the form that calls the report. I call it RptData, and it contains ONLY data to be printed. Then I call the report and preview or print.
This way if there is no data I can pop up a message box and exit gracefully.
HTH
Barbara