I have a Winforms application that uses the ReportViewer control to display SSRS reports. I have one report with many paramters that must be set by the user. I specifically set one of the parameters to have no default value so that the parameter prompts would display in the report viewer prior to running the report.
However, when the report viewer displays, the parameter prompts do not display and a message reads, "This report requires a default or user-defined value for the report parameter 'ReservationStatus'. To run or subscribe to this report, you must provide a parameter value."
If I do a ReportViewer.RefreshReport(), the prompts display. However, I don't want to call this because I also call the ReportViewer.SetDisplayMode() method to put it in print mode. This method supposedly calls the RefreshReport() method.
Also, the Show / Hide Parameter button is grayed out when the form first displays. If I click the refresh button, then the parameter button is enabled. It's a if the viewer is not picking up the parameters until a refresh is called.
Can someone explain why I can't seem to just have the viewer prompt for parameters first, then try to refresh / run the report?