I have several one-to-many forms with one parent grid and several child grids on each form. What I want to do is have the report use the forms' dataenvironment 'as is' using the parent grids' recordsource as its main table and print all records from each child grid for each record in the parent table.
I know that leaving the reports' dataenvironment empty, makes the report use the dataenvironment of the running form. The problem is that the reportwriter needs the child table (group table) to be set as its main table to be able to print childrecords (groups of records), making it necessary to create a view and use the view as source for the report and apply the current filter/order set for the forms' parent table to the view.
This seems like a lot of fuss for accomplishing a trivial task and it really shows that the VFP reportwriter is badly designed in regard to printing child lines (groups of records).
I just added a wish to the VFP7 Wish List regarding this:
'Handle report groups the same way as child grids
For each report group we should be able to specify a Linkmaster, Childalias, Childorder, Relationalexpr the way we can for childgrids on a form. When running the report, the report object should then skip thru the records in Linkmaster and select the Childalias and skip thru its' childrecords for each report group.'
Any thoughts on this anyone?
Vidar Johannessen