enter image description hereI want to upgrade existing old Reportviewer to new Reportviewer 2016. I am using .net framework 4.6 and its perfectly working in old version.
Now, when I upgrade to version 14, it will give runtime error(No exception).
Value cannot be null or empty. Parameter name: elementID
I have made all necessary changes but still I am getting this error. I have referred below URLs.
- https://learn.microsoft.com/en-us/sql/reporting-services/application-integration/integrating-reporting-services-using-reportviewer-controls-get-started
- https://social.msdn.microsoft.com/Forums/sqlserver/en-US/07b569ac-af15-4092-bd42-6aa826b39463/issue-with-report-viewer-control-v14?forum=sqlreportingservices
Error message:
Server Error in '/' Application.
Value cannot be null or empty.
Parameter name: elementID
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Value cannot be null or empty.
Parameter name: elementID
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Value cannot be null or empty.
Parameter name: elementID]
System.Web.UI.ScriptComponentDescriptor..ctor(String type, String elementID) +127
Microsoft.Reporting.WebForms.ReportViewerClientScript.SetViewerInfo(ReportViewer viewer, String reportAreaId, String promptAreaRowId, String docMapAreaId, String fixedTableId, String topLevelUpdatePanelId, String docMapUpdatePanelId, String promptSplitterId, String docMapSplitterId, String docMapHeaderOverflowId, String directionCacheId, String browserModeCacheId, ClientPrintInfo clientPrintInfo) +163
Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e) +4335
System.Web.UI.Control.PreRenderRecursiveInternal() +162
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6925
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2103.2
Finally found a solution. Removed ClientIDMode="Static" from the ReportViewer control.