Solved

slow crystal report -visual studio 2005

Posted on 2011-02-16
9
348 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now