Link to home
Create AccountLog in
Avatar of hongclub

asked on

slow crystal report -visual studio 2005


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,
Avatar of Mike McCracken
Mike McCracken

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?

Avatar of hongclub


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.

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.

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.
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.

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,
Datasets don't have parameters in the report.

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

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)
(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.
Avatar of Mike McCracken
Mike McCracken

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account