I have a Crystal Reports rpt-file, that contains 2 queries. (One for the main report, and the other for the subreport.) The user gives a parameter ("DocNum") for the main report, that connected with a key field ("DocEntry") to the subreport.
The problem is, that in this case it takes too long time to generate the report, because the Crystal Reports reads the all records to the memory, and just than creates the rpt-file.
Query of the main report:
SELECT DocNum, DocEntry, CardCode FROM OINV WHERE DocNum = {?DocNum}
Query of the subreport:
SELECT ItemCode, Dscription FROM INV1
Is there any solution, that passing the key fields value ("DocEntry") to the subreports query as a "where condition"?
Something like this:
SELECT ItemCode, Dscription FROM INV1 WHERE DocEntry = {...}
