Solved

slow crystal report -visual studio 2005

Posted on 2011-02-16
9
346 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

10 Experts available now in Live!

Get 1:1 Help Now