I have a reportviewer on my page and in the pageload codeblock I have put:
The problem is that this report has a parameter which I allow to accept blanks and when I load the page up, the report trys to get the data and display it.
I do not want it to create the report when the page loads, I want it to only try to create the report when the Preview button is pressed.
How can I do this?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
If Not Page.IsPostBack Then |
ReportViewer1.Report = New Applications.Reporting.ForecastSalesValues |
End If |
End Sub |
The problem is that this report has a parameter which I allow to accept blanks and when I load the page up, the report trys to get the data and display it.
I do not want it to create the report when the page loads, I want it to only try to create the report when the Preview button is pressed.
How can I do this?