>Sean,
>
>I would usually do this by using a SQL SELECT statement to create a cursor with fields from both the unit and task tables. The cursor would have one record for each task and would be sorted by unit, then task. For example:
>
>SELECT unit.name, unit.ID, ..., task.Date, task.Descript, ... ;
> FROM unit,task ;
> WHERE unit.ID=task.UnitID ;
> INTO CURSOR temp ;
> ORDER BY unit.Name, task.Date
>
>
>>I am designing a system with multiple units and multiple tasks for each unit, I need a report that sorts the units displays all the information including a unit header the chronologically sorts the tasks for the units, then ..on the same piece of paper puts the next unit in line with all it s information then its tasks...sorted chronologically. Anyone got any suggestions?
In addition (to Sean as well as Josh)) you can place the SQL code in the REPORT INIT method. To find it, click on 'data environment' in the View menu, then right-click on the DE screen and choose 'Properties'. You'll get a property sheet similar to the one you see for each form. Put your SQL code into the INIT method and it won't need to be called from a separate form.
HTH