Solved

slow crystal report -visual studio 2005

Posted on 2011-02-16
9
355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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. …
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 …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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