I am trying to add a subreport and pass the parameters from my main report to the subreport. When I link everything up the subreport runs through thousands of records looking for insurance information on my test subject but there is no record.
If I go to a query tool and run the query with the WHERE clause that I expect to be added on the Crystal report query it takes milliseconds to return no rows.
When i run the preview in Crystal reports it takes minutes to run through all the records. Why doesn't the query return no records like it should? Or just the one specific one I am looking for if there is a record? I don't want all 10,000+ records returned to crystal just the ONE or ZERO that I should get based on the parameters I am passing from the main report!!
Thanks for any guidance, Leslie
Edit: I have a query on the main report that needs PatID and Episode_Number. I have a query on my subreport that I would like to filter on the SAME PatID and Episode_Number. The sub-report query is:
select b.patid, b.episode_number, b.guarantor_name, Trim(b.guar_address_line1|| ' ' || ifNull(b.guar_address_line2, '')) address, b.guar_address_city || ', ' || b.guar_address_state || ' ' || b.guar_address_zip location,
b.guar_phone_number
from billing_guar_data b
I have not added any "extra" parameters onto this Command.
I have these parameters that have been added by this linking:
Pm-Command.PATID and Pm-Command.Episode_Number
which I picked from the Linking page when I created the sub-report