Skip to Content
Former Member
Mar 12, 2009 at 10:29 AM



I've come across some behavior on a project I'm working on that wasn't exactly what I was expecting.

I'm developing this solution on a laptop.

I'm using Visual Studio 2008 and the integrated version of Crystal Reports that comes with it.

I'm also using SQL Server Express (2005).

I have all the latest Windows updates and service packs applied - whatever is current I have.

The scenario is this:

I have a dataset, report and XAML window in my solution.

The report is bound to the dataset.

The XAML window has a Crystal Report Viewer on it.

In code, I create an instance of the dataset and an instance of the report.

I call out to the database, grab the data I need and fill the dataset with that data.

I then call report.setdatasource and pass it the dataset.

Finally, I set the report source of my report viewer to be my report.

The behavior is this:

If the laptop is docked (connected to the network) the whole thing takes maybe 2 seconds.

That's the time measured from clicking the button to launch the report viewer to the completion of the first page rendering.

If the laptop is undocked (not connected to the network) the equivalent operation takes about 15 seconds.

I added some logging code around each of the various method calls and in both scenarios populating the dataset takes under a second. The time delay occurs on the SetDataSource method.

Can anyone tell me why this is happening and how to fix it?

Many thanks,