0

Я создаю приложение asp.net C#, которое использует кнопки для извлечения и отображения отчетов RDLC в представлении. Отчеты загрузить без проблем на локальном хосте, но при установке на Windows Server 2012 R2 Standard 64-битном и обслуживаются через IIS версии 8.5 погрешность:Uncaught Error: Sys.InvalidOperationException: 'DocMapUpdatePanelId' не является свойством или существующим полем

Uncaught Ошибка: Sys.InvalidOperationException: «DocMapUpdatePanelId» не является свойством или существующее поле.

дается, и ни один из отчетов не отображается. Это выглядит следующим образом: enter image description here

  • Применение построен в Visual Studio 2015.
  • .NET 3.5 Report Viewer 2012 и Report Viewer 2015 одновременно установлены
  • системы Microsoft CLR Типы для SQL Server 2012 и 2014

Default.aspx

<asp:View ID="reportView" runat="server"> 
        <div class="div-view-title"><h3>TURNOUT REPORTS</h3></div> 
        <div style="padding-left: 0%;"> 

         <asp:Button ID="btnCONSTITUENCY_REPORT" runat="server" Text="CONSTITUENCY REPORT" style="background-color: #ade1ff;background: linear-gradient(#ade1ff, #6facd0);position: relative; width: 250px;height: 90px;margin: 12px; box-shadow: 10px 10px 5px #716f6f;background-size: 100% 100%;background-repeat: no-repeat;" OnClick="btnCONSTITUENCY_REPORT_Click" /> 
         <asp:Button ID="btnLOCATION_NAME_REPORT" runat="server" Text="LOCATION REPORT" style="background-color: #ade1ff;background: linear-gradient(#ade1ff, #6facd0);position: relative; width: 200px;height: 90px;margin: 12px; box-shadow: 10px 10px 5px #716f6f;background-size: 100% 100%;background-repeat: no-repeat;" OnClick="btnLOCATION_NAME_REPORT_Click" /> 
         <asp:Button ID="btnEPMVTR_SECTION_REPORT" runat="server" Text="EPMVTR SECTION REPORT" style="background-color: #ade1ff;background: linear-gradient(#ade1ff, #6facd0);position: relative; width: 250px;height: 90px;margin: 12px; box-shadow: 10px 10px 5px #716f6f;background-size: 100% 100%;background-repeat: no-repeat;" OnClick="btnEPMVTR_SECTION_REPORT_Click"/> 
        </div> 
        <div> 



        </div> 
       </asp:View> 

Default.aspx.cs

protected void btnCONSTITUENCY_REPORT_Click(object sender, EventArgs e) 
{ 
    if (IsUserSessionExpired()) 
     lblError.Text = "Session Expired"; 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnReportsViewParent"); 
    if (viewCont != null) 
    { 
     viewCont.Style.Add("background-color", "#e4e4e4"); 
     viewCont.Style.Add("background", "linear-gradient(#a4a8ce, #e7e6ff)"); 
    } 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont2 = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnElevenViewParent"); 
    if (viewCont2 != null) 
    { 
     viewCont2.Style.Remove("background-color"); 
     viewCont2.Style.Remove("background"); 
    } 

    try 
    { 
     ReportViewerCONSTITUENCY_REPORT.Reset(); 
     ReportDataSource rptdsrc = new ReportDataSource("PVC_SSVGE_CONSTITUENCY_REPORT_DataSet", GetData(@"with tosum as 
      (
      select e.cnstncy_nbr, cnstncy_nm, e.epmv_pk, e.elctn_id, e.epm_type, 
      e.voting_location,e.location_address, e.stations, e.total_elctr as 'total_elctr', 
      e.voter_turnout_11am as 'total_turnout_11am', e.voter_turnout_3pm as 'total_turnout_3pm', e.misc as 'total_turnout_misc', e.aud_uid 
      from EPMVTR_STATS e inner join UNI_CNSTNCY c 
      on e.cnstncy_nbr = c.cnstncy_nbr and e.elctn_id = c.elctn_id 
      where e.cnstncy_nbr = c.cnstncy_nbr 
      ) select cnstncy_nbr, cnstncy_nm, epm_type, sum(total_elctr) [total_elctr], sum(total_turnout_11am) [total_turnout_11am] ,sum(total_turnout_3pm) [total_turnout_3pm] 
      ,sum(total_turnout_misc) [total_turnout_misc] 
       from tosum 
       group by cnstncy_nbr, cnstncy_nm, epm_type 
      order by cnstncy_nbr; ").Tables["resultsTable"]);//GetData("Select * from EPMVTR_STATS").Tables["resultsTable"]); 
     //ReportDataSource rptdsrcSum = new ReportDataSource("PVC_SSVGE_CONSTITUENCY_REPORT_DataSet", GetData("select e.cnstncy_nbr, cnstncy_nm, e.epmv_pk, e.elctn_id, e.epm_type, e.voting_location,e.location_address, e.stations, e.total_elctr, e.voter_turnout_11am, e.voter_turnout_3pm, e.misc, e.aud_uid, e.aud_uid from EPMVTR_STATS e inner join UNI_CNSTNCY c on e.cnstncy_nbr = c.cnstncy_nbr and e.elctn_id = c.elctn_id order by cnstncy_nbr").Tables["resultsTable"]); 
     ReportViewerCONSTITUENCY_REPORT.LocalReport.DataSources.Add(rptdsrc); 
     ReportViewerCONSTITUENCY_REPORT.LocalReport.ReportPath = MapPath("~\\App_Browsers\\PVC_SSVGE_CONSTITUENCY_REPORT.rdlc"); 
     ReportViewerCONSTITUENCY_REPORT.LocalReport.Refresh(); 


    } 
    catch 
    { 

    } 


    epmMultiView.SetActiveView(viewCONSTITUENCY_REPORT); 
} 

protected void btnLOCATION_NAME_REPORT_Click(object sender, EventArgs e) 
{ 
    if (IsUserSessionExpired()) 
     lblError.Text = "Session Expired"; 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnReportsViewParent"); 
    if (viewCont != null) 
    { 
     viewCont.Style.Add("background-color", "#e4e4e4"); 
     viewCont.Style.Add("background", "linear-gradient(#a4a8ce, #e7e6ff)"); 
    } 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont2 = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnElevenViewParent"); 
    if (viewCont2 != null) 
    { 
     viewCont2.Style.Remove("background-color"); 
     viewCont2.Style.Remove("background"); 
    } 

    try 
    { 
     ReportViewerLOCATION_NAME_REPORT.Reset(); 
     ReportDataSource rptdsrc = new ReportDataSource("PVC_SSVGE_LOCATION_NAME_REPORT_DataSet", GetData("select cnstncy_nm,e.* from EPMVTR_STATS e inner join UNI_CNSTNCY c on e.cnstncy_nbr = c.cnstncy_nbr and e.elctn_id = c.elctn_id order by cnstncy_nbr, stations").Tables["resultsTable"]); 
     lbtnReportsView.Text = "Test Got here"; 
     ReportViewerLOCATION_NAME_REPORT.LocalReport.DataSources.Add(rptdsrc); 
     ReportViewerLOCATION_NAME_REPORT.LocalReport.ReportPath = Server.MapPath("PVC_SSVGE_LOCATION_NAME_REPORT.rdlc"); 
     ReportViewerLOCATION_NAME_REPORT.LocalReport.Refresh(); 

    } 
    catch(Exception) 
    { 
     lbtnReportsView.Text = "Exception"; 
    } 

    epmMultiView.SetActiveView(viewLOCATION_NAME_REPORT); 
} 

protected void btnEPMVTR_SECTION_REPORT_Click(object sender, EventArgs e) 
{ 
    if (IsUserSessionExpired()) 
     lblError.Text = "Session Expired"; 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnReportsViewParent"); 
    if (viewCont != null) 
    { 
     viewCont.Style.Add("background-color", "#e4e4e4"); 
     viewCont.Style.Add("background", "linear-gradient(#a4a8ce, #e7e6ff)"); 
    } 

    System.Web.UI.HtmlControls.HtmlGenericControl viewCont2 = (System.Web.UI.HtmlControls.HtmlGenericControl)FindControl("lbtnElevenViewParent"); 
    if (viewCont2 != null) 
    { 
     viewCont2.Style.Remove("background-color"); 
     viewCont2.Style.Remove("background"); 
    } 

    try 
    { 
     ReportViewerEPMVTR_SECTION_REPORT.Reset(); 
     ReportDataSource rptdsrc = new ReportDataSource("PVC_SSVGE_EPMVTR_SECTION_REPORT_DataSet", GetData("select cnstncy_nm,e.* from EPMVTR_STATS e inner join UNI_CNSTNCY c on e.cnstncy_nbr = c.cnstncy_nbr and e.elctn_id = c.elctn_id order by cnstncy_nbr").Tables["resultsTable"]); 

     ReportViewerEPMVTR_SECTION_REPORT.LocalReport.DataSources.Add(rptdsrc); 
     ReportViewerEPMVTR_SECTION_REPORT.LocalReport.ReportPath = MapPath("~\\App_Browsers\\PVC_SSVGE_EPMVTR_SECTION_REPORT.rdlc"); 
     ReportViewerEPMVTR_SECTION_REPORT.LocalReport.Refresh(); 
    } 
    catch 
    { 

    } 
    epmMultiView.SetActiveView(viewEPMVTR_SECTION_REPORT); 
} 

Любые идеи о том, Что вызывает эту ошибку и как это исправить?

Заранее спасибо

ответ

0

там может быть несколько версий средства просмотра отчетов, определенных в файле web.config

+0

файл web.config только ссылается версией 12. и ссылка на другую версию, привела бы в неудачная компиляция. –

Смежные вопросы