SQL server reporting services: how to stop a report firing when opened

I know this post is a bit old, but since I have another solution here to, I just posting it in case someone need it.

If you are using ReportViewer its posible to set the property ShowBody="False". Then on the OnSubmittingParameterValues event, change the ShowBody property to true. Then you do not need any extra parameters or parameters without default value in the report.

<rsweb:ReportViewer 
        ID="rv" 
        runat="server"  
        Width="100%" 
        Height="100%" 
        SizeToReportContent="false" 
        ZoomMode="PageWidth"
        KeepSessionAlive="true" 
        ProcessingMode="Remote"
        PromptAreaCollapsed="false" 
        InteractivityPostBackMode="AlwaysAsynchronous"
        AsyncRendering="true" 
        ExportContentDisposition="AlwaysInline"
        ShowReportBody="False"
        ShowPrintButton="false"
        OnSubmittingParameterValues="rv_SubmittingParameterValues"/>

And then in the rv_SubmittingParameterValues method:

this.rv.ShowReportBody = true;

I set the default value of one of my parameter selections to a value of -1 which does not exist (not a valid parameter value). This did not generate an error. It simply set the parameter drop down box to and prevented the report from running. I couldn't use a default value of NULL because NULL selects everything, and I wanted the user to purposefully make the selection of ALL (NULL) before the report runs. It takes several minutes for the report to render if ALL is selected.


I found that I had to set at least one of the report parameters to not have a default to keep the report from autorunning.

I had to use this configuration (notice that all 3 of the parameters I left without defaults accept Nulls so the users can just click the Null checkboxes):

[screenshots missing]

to get the users to see this and to keep the report from autorunning:

[screenshots missing]


I have done that by changing my query slighlty to require parameters when it is run.

I have then after I have published the report on the report site, specified that the parameter, should prompt the user. This does have the effect that the report does not pull the sql server to its knees when users just open the report to see.