Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change subreport links?

Status
Not open for further replies.

AWVN

Programmer
Apr 20, 2005
2
NL
Hello!

I have created a very basic report (only names and ID-numbers for employees) with a subreport in it, containing sales information for that particular employee. I linked the subreport to a field in the mainreport in the “change subreport link” screen. I used the ID-field for that.
Now when I want to print the records for all employees, the query is sent to the database a few hundred times and the results are filtered the moment they come back. This is not very efficient in my opinion, it takes forever to get the results back and the server is under great stress [sadeyes] .
My question: is there another way to link the subreport, so that I can speed up the report? Because I can’t use it like this. Is it possible to send the query once and get back all the results in one time, and then have the sent to the subreport the should be in?

I hope someone can help me… thanks in advance!
 
FYO... I use Crystal Reports 9!
 
The subreport is triggered any time the ID changes and because the ID is different another call to the database is made.


You could try and link the two table in one single report, and then use grouping and other options in CR to sort your data as you would like to display it. This will query the database only once.

Mo
 
It doesn't sound like you really need a subreport for this. If each employee only has one record in the sales information table (multiple fields, but all under one ID record) you can just link directly in the main report.

Try just joining the tables in the main report - should work fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top