ReportViewer 2012 multiple report viewers
Report Viewer 2012 CTP or 11.0 is not letting me load two ReportViewers at the same time. I'm using local reports for both. I have two ReportViewers and the first one is getting loaded while the other one says Object reference not set to an instance of an object. The data sources are in there and when I switch the ReportViewers, the FIRST one always works. Also after I see the message and I click the refresh button in the second (problem) report it then proceeds to work. It just doesn't load initially when the page loads. This use to work in Report Viewer 10.0. Has anyone experienced this or has a fix/workaround?
June 5th, 2012 11:14am

Hello rayboi69, I followed your description to add two report on my side, and it worked properly. Can you post out the error screenshot and ASPX file? Therefore, we can try to reproduce this issue. Regards, EdwardEdward Zhu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2012 5:01am

Hello rayboi69, I followed your description to add two report on my side, and it worked properly. Can you post out the error screenshot and ASPX file? Therefore, we can try to reproduce this issue. Regards, EdwardEdward Zhu TechNet Community Support
June 11th, 2012 5:03am

Hi Edward, Did you use Report Viewer 2012 CTP or 11.0? It works if you use 10.0 Here is my aspx file: <%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWebApplication._Default" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <form runat="server"> <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager> <asp:Button ID="btnViewREport" runat="server" onclick="btnViewREport_Click" text="Button Test"/> <rsweb:ReportViewer ID="rvTest" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="100%" Height="570px" Visible="false" > </rsweb:ReportViewer> <rsweb:ReportViewer ID="rvTest2" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="100%" Height="570px" Visible="false" > </rsweb:ReportViewer> </form> Here is my aspx.cs file: protected void btnViewREport_Click(object sender, EventArgs e) { var dt = ListData(1); rvTest.LocalReport.DataSources.Clear(); rvTest.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt)); rvTest.LocalReport.ReportPath = "Report1.rdlc"; rvTest.Visible = true; rvTest2.LocalReport.DataSources.Clear(); rvTest2.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt)); rvTest2.LocalReport.ReportPath = "Report1.rdlc"; rvTest2.Visible = true; } Here is the screenshot:
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2012 2:28pm

Hi, Have you posted this problem to http://connect.microsoft.com? If not, please do so. Thanks! Cathy Miller
June 22nd, 2012 11:57am

Hi, Have you posted this problem to http://connect.microsoft.com? If not, please do so. Thanks! Cathy Miller
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2012 12:00pm

Hello rayboi69, I created a bug on connect site. Please try to vote it on the following link. https://connect.microsoft.com/SQLServer/feedback/details/751256/error-when-adding-two-reportviewer-2012-web-control-on-page Regards, EdwardEdward Zhu TechNet Community Support
June 28th, 2012 4:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics