>Hi Jim,
>
>I agree 100%, I am using a view that groups and sorts the data before vfp gets a hold of it. But the view is the data environment. How do I run a report from code?
>
>Thanks
>Jim
Jim,
An example ...
A form has a Report button in it to run the report. In the click event of the Report Button ...
USE TheView
REPORT FORM MyReport TO PRINT
Another ... A menu has an option to print the report, the menu's code is ...
DO MyReport
and MyReport.prg is ...
USE TheView
REPORT FORM MyReport TO PRINT