Monday, February 13, 2012

ASP.NET Report Viewer Version 9.0 problem.

I recently migrated my development server from Windows Server 2003 \ IIS 6 \
.NET Framework 2 and SQL 2005 to Windows Server 2008 \ IIS 7 \ .NET Framework
3.5 and SQL 2005 SP2. SQL install also includes Reporting Services. On my dev
workstation I have upgraded to from vs2005 to vs2008 and installed the
correct AjaxToolKit 3.5 dll.
I have a web project that uses SQL reporting services and Report Viewer 8.0
which used to work ok before the migration. I have replaced the Report Viewer
8.0 control within my web project to the new vs2008 Report Viewer 9.0 and
replaced all references (web.config etc) from 8.0 to 9.0. I have also
installed the Report Viewer 9.0 download on my development server &
workstation and rebooted.
When I now run my project the report viewer control does not render my
report (or even display the default icons for the report control such as
print icon etc).
I get a client side javascript error in IE7 stating â'Error: this.Controller
is null or not an objectâ'. If I try the site on FireFox the report displays
â'404 File or Directory not foundâ' within the report viewer.
Im running the report within a user control. Please find code for the uc
containing the report viewer and associated data objects below...
<%@. Control Language="C#" AutoEventWireup="true"
CodeFile="Reporting_MainSite.ascx.cs" Inherits="NPApplets_Reporting_MainSite"
%>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="325px" Width="100%" BackColor="#95B7F3">
<LocalReport ReportPath="Report_SiteTraffic.rdlc"
EnableExternalImages="True">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="DataSet1_Report_LastMonth" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2"
Name="DataSet2_Report_Last12Months" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource3"
Name="DataSet3_Report_Last12MonthsUBS" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource4"
Name="DataSet4_Report_SinceLaunch" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource4" runat="server"
SelectMethod="GetData"
TypeName="DataSet4TableAdapters.Report_SinceLaunchTableAdapter"
OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:ControlParameter ControlID="lbWondersiteToReportOn"
Name="Wondersite_FullName"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource3" runat="server"
SelectMethod="GetData"
TypeName="DataSet3TableAdapters.Report_Last12MonthsUBSTableAdapter"
OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:ControlParameter ControlID="lbWondersiteToReportOn"
Name="Wondersite_FullName"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="GetData"
TypeName="DataSet2TableAdapters.Report_Last12MonthsTableAdapter"
OldValuesParameterFormatString="original_{0}" >
<SelectParameters>
<asp:ControlParameter ControlID="lbWondersiteToReportOn"
Name="Wondersite_FullName"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData"
TypeName="DataSet1TableAdapters.Report_LastMonthTableAdapter"
OldValuesParameterFormatString="original_{0}" >
<SelectParameters>
<asp:ControlParameter ControlID="lbWondersiteToReportOn"
Name="Wondersite_FullName"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Label ID="lbWondersiteToReportOn" runat="server"
Visible="False"></asp:Label>
Within VS2008 designer the Report Viewer control shows the controls icons
correctly (print icon etc).
I have 4 data objects that my report uses. If I try and modify the data
source objects via the Smart Tag > Configure Data Source I get the following
error...
"The type 'DataSet4TableAdapters.Report_SinceLaunchTableAdapter' could not
be loaded. If the type is located in the App_Code folder, please check that
it compiles. If the type is located in a compiled assembly, pleaee check that
the assembly is referenced by the project.
The type "DataSet4TableAdapetrs.Report_SinceLaunchTableAdapter' could not be
foundâ'"
I have checked my DataSet.xsd files located in my App_Code directory and
everything compiles ok.
Im now stumped as what to try next. Any help, advice or pointers would be
very much appreciated.
Thanks in advance,
Paul.Managed to track down a fix...
Open Internet Information Services (IIS) Manager and select your Web
application.
Under IIS area, double-click on Handler Mappings icon.
At the Action pane on your right, click on Add Managed Handler.
At the Add Managed Handler dialog, enter the following:
Request path: Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler
Name: Reserved-ReportViewerWebControl-axd
Click OK.
http://otkfounder.blogspot.com/2007/11/solving-reportviewer-rendering-issue-on.html
Paul.
"Paul Hale" wrote:
> I recently migrated my development server from Windows Server 2003 \ IIS 6 \
> .NET Framework 2 and SQL 2005 to Windows Server 2008 \ IIS 7 \ .NET Framework
> 3.5 and SQL 2005 SP2. SQL install also includes Reporting Services. On my dev
> workstation I have upgraded to from vs2005 to vs2008 and installed the
> correct AjaxToolKit 3.5 dll.
> I have a web project that uses SQL reporting services and Report Viewer 8.0
> which used to work ok before the migration. I have replaced the Report Viewer
> 8.0 control within my web project to the new vs2008 Report Viewer 9.0 and
> replaced all references (web.config etc) from 8.0 to 9.0. I have also
> installed the Report Viewer 9.0 download on my development server &
> workstation and rebooted.
> When I now run my project the report viewer control does not render my
> report (or even display the default icons for the report control such as
> print icon etc).
> I get a client side javascript error in IE7 stating â'Error: this.Controller
> is null or not an objectâ'. If I try the site on FireFox the report displays
> â'404 File or Directory not foundâ' within the report viewer.
> Im running the report within a user control. Please find code for the uc
> containing the report viewer and associated data objects below...
> <%@. Control Language="C#" AutoEventWireup="true"
> CodeFile="Reporting_MainSite.ascx.cs" Inherits="NPApplets_Reporting_MainSite"
> %>
> <%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0,
> Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
> Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
> <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
> Font-Size="8pt" Height="325px" Width="100%" BackColor="#95B7F3">
> <LocalReport ReportPath="Report_SiteTraffic.rdlc"
> EnableExternalImages="True">
> <DataSources>
> <rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
> Name="DataSet1_Report_LastMonth" />
> <rsweb:ReportDataSource DataSourceId="ObjectDataSource2"
> Name="DataSet2_Report_Last12Months" />
> <rsweb:ReportDataSource DataSourceId="ObjectDataSource3"
> Name="DataSet3_Report_Last12MonthsUBS" />
> <rsweb:ReportDataSource DataSourceId="ObjectDataSource4"
> Name="DataSet4_Report_SinceLaunch" />
> </DataSources>
> </LocalReport>
> </rsweb:ReportViewer>
> <asp:ObjectDataSource ID="ObjectDataSource4" runat="server"
> SelectMethod="GetData"
> TypeName="DataSet4TableAdapters.Report_SinceLaunchTableAdapter"
> OldValuesParameterFormatString="original_{0}">
> <SelectParameters>
> <asp:ControlParameter ControlID="lbWondersiteToReportOn"
> Name="Wondersite_FullName"
> PropertyName="Text" Type="String" />
> </SelectParameters>
> </asp:ObjectDataSource>
> <asp:ObjectDataSource ID="ObjectDataSource3" runat="server"
> SelectMethod="GetData"
> TypeName="DataSet3TableAdapters.Report_Last12MonthsUBSTableAdapter"
> OldValuesParameterFormatString="original_{0}">
> <SelectParameters>
> <asp:ControlParameter ControlID="lbWondersiteToReportOn"
> Name="Wondersite_FullName"
> PropertyName="Text" Type="String" />
> </SelectParameters>
> </asp:ObjectDataSource>
> <asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
> SelectMethod="GetData"
> TypeName="DataSet2TableAdapters.Report_Last12MonthsTableAdapter"
> OldValuesParameterFormatString="original_{0}" >
> <SelectParameters>
> <asp:ControlParameter ControlID="lbWondersiteToReportOn"
> Name="Wondersite_FullName"
> PropertyName="Text" Type="String" />
> </SelectParameters>
> </asp:ObjectDataSource>
> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
> SelectMethod="GetData"
> TypeName="DataSet1TableAdapters.Report_LastMonthTableAdapter"
> OldValuesParameterFormatString="original_{0}" >
> <SelectParameters>
> <asp:ControlParameter ControlID="lbWondersiteToReportOn"
> Name="Wondersite_FullName"
> PropertyName="Text" Type="String" />
> </SelectParameters>
> </asp:ObjectDataSource>
> <asp:Label ID="lbWondersiteToReportOn" runat="server"
> Visible="False"></asp:Label>
> Within VS2008 designer the Report Viewer control shows the controls icons
> correctly (print icon etc).
> I have 4 data objects that my report uses. If I try and modify the data
> source objects via the Smart Tag > Configure Data Source I get the following
> error...
> "The type 'DataSet4TableAdapters.Report_SinceLaunchTableAdapter' could not
> be loaded. If the type is located in the App_Code folder, please check that
> it compiles. If the type is located in a compiled assembly, pleaee check that
> the assembly is referenced by the project.
> The type "DataSet4TableAdapetrs.Report_SinceLaunchTableAdapter' could not be
> foundâ'"
> I have checked my DataSet.xsd files located in my App_Code directory and
> everything compiles ok.
> Im now stumped as what to try next. Any help, advice or pointers would be
> very much appreciated.
> Thanks in advance,
> Paul.
>

No comments:

Post a Comment