This is a migrated thread and some comments may be shown as answers.

Force WinForms viewer to show "loading"

1 Answer 240 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 17 Feb 2009, 08:35 PM
Hello,

I load the data for several of my reports through a web services layer, which can sometimes be a tad slow (as you might expect). I display a Windows Form dialog that has a report viewer embedded in it, and the dialog then requests the report data asynchronously.

What I would like to do is force the report viewer to show the "progress" animation while I'm out fetching data through the web service. But there doesn't seem to be a method within the viewer class that would support such.

Is there a way to do this? If so, how?

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 18 Feb 2009, 01:04 PM
Hi Mark,

If you take a look at our Demos, you would notice that we are doing the asynchronous request for you. Basically the flow should be as follows:

  Telerik.Reporting.Report Report1 = new Report4();
  reportViewer1.Report = Report1;
  reportViewer1.Report.DataSource = null;
  reportViewer1.RefreshReport();

Line #3 is redundant if you have not set DataSource in design time or in the report constructor. When the DataSource is null, the NeedDataSource event of the report would be fired, where you need to synchronously get your data. While all these operations take place, the Loading image of the viewer would indicate that we're working behind the curtains.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or