We had a MS ReportViewer 9.0.0.0 control on a custom DotNetNuke module in the (legacy) 4.8.2 version. While trying to upgrade to 10.0.0.0 we run into the following error:
PageLoadException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Here's the relevant ASCX code for the main View control in the DotNetNuke module:
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<rsweb:ReportViewer ID="report" runat="server" ProcessingMode="Remote" />
Additionally, there's some code behind that sets the IReportServerCredentials
, I've left out that bit of code as the problem occurs before the report's even rendered.
The stack trace is quite large, but here are some of the relevant bits:
DotNetNuke.Services.Exceptions.PageLoadException
System.InvalidOperationException: Page cannot be null
at System.Web.UI.ScriptManager.get_IPage()
...
at Microsoft.Reporting.WebForms.ReportViewer.Render(HtmlTextWriter writer)
...
at DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer)
My Google-fu is not helping me at all. I've tried fiddling with the ScriptManager
in DotnetNuke's Default.aspx.vb file, playing around with the properties of the ReportViewer control, and reading the various related MSDN articles. No dice.
The question: How to get ReportViewer 10.0.0.0 working in DotNetNuke 4.8.x?