Solved

slow crystal report -visual studio 2005

Posted on 2011-02-16
9
352 Views
Last Modified: 2012-05-11
Hi,

I have created a crystal report with excel import, it works fine.
Now i need to switch my crystal report using stored procedure from the server.

it works fine with small set of data retrieve from stored procedure.
However, once the data is large, the crystal report viewer seems malfunction, export button, next, prev button always slow and seems talking to the stored procedure again everytime i hit it.

I know my stored procedure is complicated and slow, but i need to use it.

Please advise,
Tommy
0
Comment
Question by:hongclub
  • 5
  • 3
9 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 34912901
You are correct.

Crystal uses a page on demand method of building the report thus it displays page 1 and waits until you ask for page 2 to render it.

Any particular reason you think the SP is slow?
Does it run slowly in Query Analyzer?

mlmcc
0
 

Author Comment

by:hongclub
ID: 34913007
our team built that SP a while ago ... it is a complicated sp ... but i am okay with the slow sp ... we all know that ....

the issue is the toolbar on crystal view, is slow to nagivate ...  any thought ....

that's why i am thinking to just export to pdf without go through the viewer (we are okay with this), but i need a input screen for sp parameter input.

Tommy
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34913060
Two choices
1.  Use the Crystal screen
2.  Build your own and then use code to pass the parameters.

Building your own may allow you to use different SPs or methods to get the values for the parameter lists.

mlmcc
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Expert Comment

by:Mr_Yeyo
ID: 34948504
hongclub, I presume that your Sp is generating a result with the data that you need, uppon the expireance that I have when you are working with a large amount of data is always best to make an summary table where the data is already pre agreed and if this can be done in daily base this will improve the performance.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34948650
Mr_Yeyo - The asker is asking about why the report is slow when moving between pages.  He understands his SP may be slow but is ok with that.

His followup dealt with how to export through code without the viewer and how to get parameters to the SP.

Please keep your comments onn target.

mlmcc
0
 

Author Comment

by:hongclub
ID: 34956594
Hi Mimcc,

Another question.
I was able to use Dataset and called stored procedure to push data to the report (push method).
One thing i need to do is the report needed parameter fields (like startDate).

When i create the dataset in VS, i add the stored procedure there. but the parameters fields are not adding, what should i do?

Please advise,
Tommy
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34956695
Datasets don't have parameters in the report.

You would add the "parameters" in the application and pass them when you create the dataset.

mlmcc
0
 

Author Comment

by:hongclub
ID: 34971978
ic ... one quick question though.

Which one is a better approach?
(1) used the OLE connect to stored procedure directly, then pull the data to the report (pull method)
-or-
(2) used dataset (ADO.NET) and use C# to pull data from stored procedure and push it to report (push method).

For the (1) solution, i am worried everytime i change the server, i need to change the connection inside the report (cuz the connection is embedded to the report).
I think (2) solution is more flexible, right? since the connection is inside the C#.

Please advise,i kind of think (2) solution is a better practice. i am not a big fan of embedded stuff.
Tommy
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34972823
I generally advise people to use the second approach since it unties the report from the environment.

Here is an example
http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

mlmcc
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question