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

Refresh report in Silverlight ReportViewer

3 Answers 313 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sofi sofi
Top achievements
Rank 1
sofi sofi asked on 04 Dec 2009, 07:27 AM
Hi , Telerik!
    I have a small question: how  can i refresh a report in Silverlight ReportViewer programmatically?

3 Answers, 1 is accepted

Sort by
0
Accepted
M. Oğuz Güner
Top achievements
Rank 1
answered on 05 Dec 2009, 11:22 PM

((

 

ReportViewerModel)(ReportViewer1.DataContext)).ApplyReportParametersCommand.Execute(null);

 

0
Igor
Top achievements
Rank 1
answered on 21 Jul 2010, 03:34 PM
I also have a small question:
I add event handler to RenderBegin event to update my parameters when I render report:
private void ReportViewerCompaignRenderBegin(object sender, RenderBeginEventArgs args)
        {
            if (DateFrom > DateTo)
            {
                DateTo = DateFrom;
            }
            args.ParameterValues.Clear();
            args.ParameterValues.Add("TimeInterval", TimeInterval.ToString());
            args.ParameterValues.Add("DateFrom", DateFrom);
            args.ParameterValues.Add("DateTo", DateTo);
            args.ParameterValues.Add("Publication", Publication);
        }
When ReportViewer is initializing - it read this parameters well, but when I try refresh report with method:
public void Draw()
        {
            ((ReportViewerModel) (DataContext)).ApplyReportParametersCommand.Execute(null);
        }
It doen't update report parameters. Can you help me some way?
0
Igor
Top achievements
Rank 1
answered on 22 Jul 2010, 07:09 AM
Sorry, this is my fault. All work well.
Tags
General Discussions
Asked by
sofi sofi
Top achievements
Rank 1
Answers by
M. Oğuz Güner
Top achievements
Rank 1
Igor
Top achievements
Rank 1
Share this question
or