Hi
How do I clear the report viewer (using Silverlight but would be the same for all?) after having generated a report and I want run another?
So for example I fetch my data and render a report. Now my user selects a different report to run, I need the report viewer to clear itself while I wait for my data and the new report to render.
Even I get confused when I look away after selecting my report to run and then looking back I'm not sure if the report has rendered until I see the spinning arrows.
Thanks
Robin
Hello Robin,
Thank you for your post. I have been looking into your question and I was wondering how exactly you are trying to change the displayed report. Are you trying to change only the report data ?
It would be great, if you could attach a sample application that shows your issue.
Looking forward to hearing from you.
Let me explain slightly differently.
I have a single report viewer with a menu option of reports on the left. The user selects what data and report they want, I fetch the data and render the report on the Silverlight client side.
Now the user wants a different report or different data criteria. They make their selection and we wait for the data to come through and the report to render.
Everything works perfectly. No issues.
The problem for me is the first report still shows in the report viewer while we wait for the data for the second and for it to be rendered.
So I would like to clear the report viewer so that it is blank like it was when I started.
Thank you your reply. Could you please, if possible, attach a sample application that shows your scenario in order to investigate it on my side ?
I don't think a sample will explain what I require. All I need is a way to clear the ReportViewer control after I have shown a report.
Something like:-
MyReportViewer.Clear();
Kr
Thank you for your reply. I have been looking into your requirement and you may set the ‘DefinitionUri’ of the rendering setting of the XamReportViewer to ‘null’ like :
(this.xamReportViewer1.RenderSettings as ClientRenderSettings).DefinitionUri = null;
Let me know, if you need any further assistance on this matter.
Hi Robin,
Thank you for your feedaback. I am glad that you have managed to resolve your issue.
Hi Yanko
Works perfectly - exactly what I needed.