Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Uncaught Error: Sys.InvalidOperationException: DocMapUpdatePanelId is not a property or an existing field. at Function.Error$create [as create] ScriptResource.axd?d=PXqBIVHa_WMzdgrINwhO3R5spCCbOfnWfNIiW2UuHiVvmCaEt3_43NVY_-3xY

$
0
0

I get the error abovewith the following snippet of code.The code works fine on localhostand runs without errors

but on the windows 2012 server Iget the above error.This application is setup within a

larger application (Please see image of IIS setup above).This application has reference name epmvtrand uses report

viewer 12and was developed in visual studio2015 but all the others Use reportviewer 11as they were developed in

previous versions of visual studio.Thereisno reference to reportviewer 11in epmvtr which includes it web.config

file but the reports fail to load and the above error appearsin the javascript console. I want toget the reports

loading and their saveas features working.Any suggestions? I have been searchingfor an answer for more than

2 weeks:

div style="width:795px; height:495px; float:right;"><asp:MultiView ID="epmMultiView" runat="server" ActiveViewIndex="0"><asp:View ID="elevenView" runat="server"><div class="div-view-title"><h3>TURNOUT ENTRIES</h3></div><div style="margin: 0 auto; "><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Label ID="lblVotLocat" runat="server" Text="Location:" style="font-family: Verdana,sans-serif;"></asp:Label><asp:DropDownList ID="ddlVotLocat" runat="server" style="font-family: Verdana,sans-serif;margin-left: 22px; width: 290px; padding: 16px 20px; border: none; border-radius: 4px; background-color: #f1f1f1;" AutoPostBack="True" OnSelectedIndexChanged="ddlVotLocat_SelectedIndexChanged" ></asp:DropDownList></div><div style="margin: 0 auto; height: 25%; width: 400px; margin-bottom: 5px;"><asp:Label ID="lblType" runat="server" Text="Type:" style="font-family: Verdana,sans-serif;"></asp:Label><asp:DropDownList ID="ddlVoterType" runat="server" style="width: 290px;font-family: Verdana,sans-serif;margin-left: 50px; padding: 16px 20px; border: none; border-radius: 4px; background-color: #f1f1f1;" OnSelectedIndexChanged="ddlVoterType_SelectedIndexChanged" AutoPostBack="True" ></asp:DropDownList></div><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Label ID="lblPs" runat="server" Text="Station #:" style="font-family: Verdana,sans-serif;"></asp:Label><asp:DropDownList ID="ddlPollStat" runat="server" onchange="refreshTxt()" style="font-family: Verdana,sans-serif;margin-left: 13px; width: 290px; padding: 16px 20px; border: none; border-radius: 4px; background-color: #f1f1f1;" AutoPostBack="True" OnSelectedIndexChanged="ddlPollStat_SelectedIndexChanged" ></asp:DropDownList></div><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Label ID="lblTimeType" runat="server" Text="Time Type:" style="font-family: Verdana,sans-serif;"></asp:Label><asp:DropDownList ID="ddlTimeType" runat="server"  onchange="refreshTxt()" style="font-family: Verdana,sans-serif;margin-left: 5px; width: 290px; padding: 16px 20px; border: none; border-radius: 4px; background-color: #f1f1f1;" ></asp:DropDownList></div><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Label ID="lblVoters" runat="server" Text="# Of Voters: " style="font-family: Verdana,sans-serif;"></asp:Label><asp:TextBox ID="txtVoters" runat="server" style="text-align:center; font-family:Verdana,sans-serif;width: 280px; border: 3px solid #adadad; padding: 12px 20px; margin: 8px 0; box-sizing: border-box;"></asp:TextBox></div><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Button ID="btnSave11" runat="server" Text="Submit" OnClientClick = "Confirm()" OnClick="btnSave11_Click" style="font-family: Verdana,sans-serif;width: 100%;background-color: #16394e; border: none; color: white;  padding: 16px 32px; text-decoration: none; margin: 4px 2px; cursor: pointer; background: linear-gradient(#4847ab, #142685);" /></div><div style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px;"><asp:Label ID="lblError" runat="server" Text="" style="font-family: Verdana,sans-serif;" > </asp:Label></div><asp:GridView ID="gvStationSummary" runat="server" style="margin: 0 auto; height: 25%; width: 400px;margin-bottom: 5px; text-align:center;" AutoGenerateColumns="False" EnableModelValidation="True"><Columns><asp:BoundField DataField="voter_turnout_11am" HeaderText="11AM" ItemStyle-Height="20px" ItemStyle-Width="100px" ReadOnly="True" Visible="True"><ItemStyle Height="20px" Width="130px"/></asp:BoundField><asp:BoundField DataField="voter_turnout_3pm" HeaderText="3PM" ItemStyle-Height="20px" ItemStyle-Width="100px" ReadOnly="True" Visible="True"><ItemStyle Height="20px" Width="130px"/></asp:BoundField><asp:BoundField DataField="misc" HeaderText="MISC" ItemStyle-Height="20px" ItemStyle-Width="100px" ReadOnly="True"><ItemStyle Height="30px" Width="130px" /></asp:BoundField></Columns><EmptyDataTemplate>
                                        No Results</EmptyDataTemplate><FooterStyle BackColor="#F7DFB5" ForeColor="#32399b" /><HeaderStyle BackColor="#32399b" Font-Bold="True" ForeColor="White" VerticalAlign="Top"/><PagerStyle ForeColor="#3b3fa1" HorizontalAlign="Center" /><RowStyle BackColor="#fcfcfc" ForeColor="#3b3fa1" Height="30px" /><SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" /></asp:GridView></div></asp:View><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);; 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);; 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);; 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><asp:View ID="viewCONSTITUENCY_REPORT" runat="server"><rsweb:ReportViewer ID="ReportViewerCONSTITUENCY_REPORT" runat="server" Height="460px" Width="780px"></rsweb:ReportViewer></asp:View><asp:View ID="viewLOCATION_NAME_REPORT" runat="server"><rsweb:ReportViewer ID="ReportViewerLOCATION_NAME_REPORT" runat="server" Width="780px" Height="460px"></rsweb:ReportViewer></asp:View><asp:View ID="viewEPMVTR_SECTION_REPORT" runat="server"><rsweb:ReportViewer ID="ReportViewerEPMVTR_SECTION_REPORT" runat="server" Width="780px" Height="460px"></rsweb:ReportViewer></asp:View></asp:MultiView></div>

This is the C# which controls the buttons and load the different views containing RDLC reports for each view

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("~\\Reports\\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"]);

            ReportViewerLOCATION_NAME_REPORT.LocalReport.DataSources.Add(rptdsrc);
            ReportViewerLOCATION_NAME_REPORT.LocalReport.ReportPath = Server.MapPath("~\\Reports\\PVC_SSVGE_LOCATION_NAME_REPORT.rdlc");
            ReportViewerLOCATION_NAME_REPORT.LocalReport.Refresh();

        }
        catch(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("~\\Reports\\PVC_SSVGE_EPMVTR_SECTION_REPORT.rdlc");
            ReportViewerEPMVTR_SECTION_REPORT.LocalReport.Refresh();
        }
        catch
        {

        }
        epmMultiView.SetActiveView(viewEPMVTR_SECTION_REPORT);
    }

 

 

 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>