views:

692

answers:

1

In Microsoft Reporting Services 2005, I would like my report to refresh every time the value of a sql parameter is changed by the viewer.

How can that be done ? More generally, how can I force refresh on certain actions (typically, a click on a button ) ?

+1  A: 

I find that the best way to refresh a report is to do the following:

  1. Do a ReportViewer.Reset()
  2. Set the ReportDefinition on the ReportViewer control again.
  3. Do a ReportViewer.RefreshReport()

You could write the above logic into a function, then call the function whenever a Event occurs.

Jon

related questions