views:

238

answers:

2

Using vs2008, winforms C#.

Im using the crystal reports version that comes with vs2008.

I can create and load a crystal report ok. But becasue it can take a few minutes to load, i want to bring up a wait cursor, but am having trouble with that.

I have tried setting the this.crystalReportViewer1.Cursor = Cursors.WaitCursor;

and tried the parent form this.cursor = cursors.waitcursor;

The cursor changes briefly to wait mode, then changes back before the report has finished loading. How can i best set the wait cursor before the report starts to load, force it to stay in wait mode then change it back to the arrow, only after the report has finished loading

thanks for any advice

A: 

I am not sure about VS2008, but in VS2005 the Crystal Viewer control has a "UseWaitCursor" property that seems to do what you are seeking.

Mosty
A: 

You would think so wouldnt you. It does seem like it should work. But what i have found is using the "UseWaitCursor" property on the crystal report viewer results in

  1. when loading large data amounts cursor = arrow, screen is blank, looks like lockup
  2. data finish loading
  3. cursor goes hourglass
  4. report view shows 1 sec later
  5. cursor goes to arrow.

Basicly the busy cursor stays busy for 1 brief second before the report displays, but only after all the data has been loaded.

I found another option that finally worked for me

in summary

this.Cursor = Cursors.WaitCursor;

Load Data();

this.crystalReportViewer1.ReportSource = Rpt;

this.crystalReportViewer1.ShowFirstPage();

this.Cursor = Cursors.Default;

this process worked for me finally

Spooky2010