views:

605

answers:

2

Hi every body I have converted one of my old solutions from .Net 1.1 to 2 via Visual Studio 2008. It's reports were conveted too and I embeded them in my solution. although they work properly,but their first load take such a long time. What can I do for this problem?

+1  A: 

Most likely this is due to the overhead of loading and initialising the Crystal Reports runtime the first time you need it.

Assemblies aren't loaded until they are referenced - not every assembly is loaded at program startup. Also, the overhead of spinning up the Crystal Reports runtime itself can be significant.

If you're game, you might be able to reduce the perceived delay by pre-emptively triggering initialization with a background thread ...

Bevan
thanksI did it,but It didn't solve the problem.by the way,when I run that report in my own computer where visual studio has been installed there is no problem.but when I run it in another computer ,the report loads very slow at the first time.
Mehdi.KH
Is your report running against a data source (i.e. a database) or against data generated by your application and injected into the report? I'm wondering if the slow startup problem is associated with establishing the database connection - and the various challenges of authentication and authorisation associated with that.
Bevan
NO,My report is running against data generated by my application.I is a dataTable in a dataset
Mehdi.KH
A: 

This is probably due to the overhead of loading the .NET files. First .NET call of the day is slow. Fine after that. That would also explain why it is fine on your development machine (loads .NET when you start up the development environment) and not other machines. Try running something else that loads .net (Paint.Net, say) on a machine, then see if your report loads quickly the first time you call it.

Doug Johnson