There is no default value, and you MUST select a user id before running the report.
For some reason, even though there is no default value and the user hasn't chosen an item, when the page loads, the report renders, without the needed parameter being supplied, which causes a missing parameter exception.
Can I
a) Prevent the autoload altogether?
b) If not, is it a bug that is autorenders when a parameter hasnt been supplied?
<ReportParameter Name="UserID" Type="Integer" Visible="True" AllowBlank="False">
<AvailableValues DataSourceName="sqlDataSource2" DisplayMember="=Fields.Name" ValueMember="= Fields.ID" />
<Value>
<String></String>
</Value>
</ReportParameter>
19 Answers, 1 is accepted

Setting AllowNull="False" in the markup doesnt help either.
We have tested the described scenario on our end. When the report parameter is required (AllowNull = False, AllowBlank = False, and no default value) the report is not rendered in the viewer. Instead the following error message is displayed: error message.
Currently, this is the default behavior of the HTML5 Report Viewer. We have plans to make the error message more user friendly in a future version of the Reporting suite.
In the meantime you can manually handle the scenario when the report parameter is not supplied with a value. Set the AllowBlank/AllowNull property to True and then if the parameter is blank/null, suppress some of the sections in the report and provide an appropriate error message via a text box in the report header section.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Instead, the report viewer should wait until the user presses the Preview button, after choosing all parameters.
It makes no sense to call and show an error when you already know it is going to fail. Just let the user choose the parameters first...
Thank you for the provided feedback. We will further look into the issue with the report parameters validation and see if we can implement a different behavior, such as the one you suggested.
We have logged this behavior in our system for improvement and it will be addressed for a future version of the Reporting suite.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Thank you for your feedback. You have a point and we agree that the current behavior should be reworked. This issue has been logged in our system and it will be addressed in a future version of Telerik Reporting.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.



Telerik - i would add a request for this feature along with the other requests I've seen on this site for this, which appear to date back to 2011 based on another post I found.

Preview button in the viewer's parameters area appears when at least one visible report parameter has AutoRefresh property set to false.
In this case to preview the report, the end user should click the Preview button. If all parameters have default values, the report runs automatically on view.
More detailed information can be found in HTML5 Report Viewer help article.
Regards,
Katia
Telerik by Progress

Hi Katia,
Thanks for the replay. I have 4 parameters and all of them have AutoRefresh property set to false in the designer . But still im not getting the preview button in the Parameters area.
I only have refresh button which refreshes the full report and remove all the parameter sections.
Could you please help me with this? Is there any other settings we need change ?
Check if the report parameters have property set to True.
Another possible reason for not seeing the Preview button is custom CSS applied to the viewer. You can check using browser's console if there any custom styles applied to the viewer and disable them if needed.
If the issue persists, you can attach a demo project reproducing it in a support ticket so we can test it locally.
Regards,
Katia
Telerik by Progress

Hi Katia,
Thank for the reply. Forgive me that was one of my mistakes. There were some custom css applied to the viewer. We fixed it and now the Preview button is visible.

Hi,
Is there any solution yet for stopping auto rendering of Html5 report. Report should not render until Preview clicked. Is there any way to achieve this?
Test setting AutoRefresh property to False for all report parameters. If no default value is set as parameter's Value property and AllowNull/AllowBlank are also set to False the notification appears in the report preview area prompting the user to enter the valid values for the report parameters.
For more detailed information about parameter's settings, you can check this help article.
Regards,
Katia
Telerik by Progress

My problem is i have to set default parameters but don't want report to render automatically until Preview clicked. I can't make AutoRefresh false and don't want to have error also, just want to stop auto rendering. In earlier telerik version we added below code to stop auto rendering which is not working with Html5 version. Please provide a solution for same, its really important
<script type="text/javascript">
ReportViewer.prototype.GenerateReport = ReportViewer.prototype.RefreshReportArea;
ReportViewer.prototype.RefreshReportArea = function (refresh)
{
if (refresh)
{
this.GenerateReport(refresh);
}
else
{
this.DisplayError("<br /><br />Click Refresh or Preview button to generate the report.");
this.EnableRefreshButton(true);
}
}
</script>

Hi Katia,
Please respond to my post. It is really important to knwo whethere this is possible or not.
Thanks
Shweta
Such behavior is not supported, the report will always execute when it is shown in the viewer and valid values for the report parameters are set as their Value properties.
To stop the report from rendering you need to reset the parameters' Value properties and set AutoRefresh, AllowNull(AllowBlank) properties to false.
A workaround can be to add a hidden report parameter with no default value and to use the custom UI for the parameter's area to pass the value for the hidden parameter when the custom Preview button is clicked - How To: Pass Values to Report Parameters.
Regards,
Katia
Telerik by Progress