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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports Subreport Linking Slow Reports

Status
Not open for further replies.

glyph1

Programmer
Jun 15, 2007
26
0
0
CR Version: Visual Studio.Net 2005 Crystal Reports

I am having a speed problem while using the subreport linking in crystal reports.

I have three tables:

Document - DocumentID, ContractID
Contract - ContractID, ContractNumber
ContractHistory - HistoryID, DocumentID, ContractID

In my report I want to display the DocumentID, ContractNumber, as well as all of ContractNumber(s) based on the DocumentID.

I created a subreport using a subreport links of DocumentID to the main page, but the reports are taking quite a long time to load (5 minutes).

What is a faster or the fastest way to accomplish this task?

Thank you in advance.
 
Each subreport does its own request for data to the server. If done at detail-line level this takes a lot of time.

Any reason why you can't link in the main report? Note that a left-outer link would let you show combinations like a contract without history.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I solved this by doing the following:

1) Creating a stored procedure instead of linking in crystal reports.
2) In the stored procedure I created a simple select statement that selects the ContractNumber.
3) In a sub query I selected the ContractNumber and linked the ContractHistory.ContractID to Contract.ContractID AS PreviousContract.
4) In crystal reports I simply used the stored procedure as my data source.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top