First select all of the data into one cursor
SELECT table1.code, table1.reqno, table2.lineno ;
FROM table1, table2 ;
WHERE table1.commonfield = table2.commonfield ;
INTO CURSOR cReport
REPORT FORM rClaude PREVIEW
In the report group by code, then group by reqno
Note ensure that the fields on the report are trying to access table1 or table2 directly.
>I have the following, simplified, report I am trying to create in VFP 5.
>
>2 tables related by a common field. It is a 1-n relationship. Table 1 has a requisition nunber and table 2 has multiple 1 to n lines for each requisition number. The report writer only shows the first line in table 2 even if it as more lines. Table 1 is ordered by its primary key, code, which is not the common field and table 2 is sorted by common field and line number. How do I get the report to display
>
> code1
> reqno11 lineno11
> lineno12
> .
> .
> reqno12 lineno21
> lineno22
> .
> .
>
> code2
> reqno21 lineno11
> lineno12
> .
> .
>
>
>What I get is lineno11 for all records in table 2