Post Author: rockshox
CA Forum: General
I have created a report in Crystal Reports 8.5 which includes a SubReport. I've linked the SubReport to the main report and when I run the report, everything looks perfect, exactly the way I want it. However, this report will be going against a very large dataset soon. I ran the report in profiler and found that the SubReport does not contain a WHERE clause and is pulling the whole dataset, before filtering to the selected data. The Main report and SubReport are linked on a uniqe Doc_ID number. Profiler shows 2 queries for the report, one for the Main report and one for the SubReport. The Main report correctly has a where clause (where doc_id = 1052), which significantly reduces the amount of data. The SubReport does not have a where clause at all and selects the whole dataset and then returns the data for doc_id 1052. The SubReport is linked on doc_id, so I would expect the SubReport to only be selecting the data for the doc_id that was set on the Main report. Anyone have any ideas?