Child window appears in background when parent window is in maximize state

2 posts, 1 answers
  1. Ravindra
    Ravindra avatar
    3 posts
    Member since:
    Mar 2012

    Posted 05 Jul 2013 Link to this post

    Hi,

    We have issue with rad window.  Here is small description of the issue,

    Operating System: Windows 7
    Telerik Version: 2012.1.215.40
    Browser we use: IE 8 and above, Mozilla 22
    Editor: Visual Studio 2010
    DOTNET framework: 4.0

    Now the scenario is as follows,
    There is home page from where we open one popup window say window 1.  There are another two popup windows which opens on clicking the buttons which are on window 1.  But one of the window say window 2 is added on home page and another say window 3 is added on window 1.  window 1 behavior is set to "Maximize".
    If we open window 1 from home page and try to open window 2 or 3 from window 1, it works fine.  When we maximize window 1 by clicking on maximize button and if we try to open window 3, it works fine.  But if we try to open window 2, it opens and appears in background of window 1.  If we minimize window 1 again then we able to see window 2 normally.  We tried to set z-index, it's not working.  Please help us out.

    Here is Code,

    Home.aspx
    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" ValidateRequest="false"
        EnableEventValidation="false" CodeBehind="Home.aspx.cs" Inherits="MyProject.MyProjectPortal.Web.CalendarAdministrator.Home" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    <%@ Register Src="~/Controls/CalendarNotInitialized.ascx" TagName="CalendarNotInitialized"
        TagPrefix="Calendar" %>
    <%@ Register Src="~/Controls/LastPostedDate30Days.ascx" TagName="LastPostedDate30Days"
        TagPrefix="LastPostedDate" %>
    <%@ Register Src="~/Controls/Permissions.ascx" TagName="PermissionsList" TagPrefix="Permissions" %>
    <%@ Register Src="~/Controls/SystemSettings.ascx" TagName="SystemSettings" TagPrefix="SystemSetting" %>
    <%@ Register Src="~/Controls/PermissionDetails.ascx" TagName="PermissionDetails"
        TagPrefix="Permissions" %>
    <%@ Register Src="~/Authentication/UserAuthSettings.ascx" TagName="UserSettings"
        TagPrefix="UserSettings" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
        <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
        <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
        <script src="../Scripts/Report.js" type="text/javascript"></script>
        <script type="text/javascript">
     
            function PopupCenter(pageURL, title, w, h) {
                var left = (screen.width / 2) - (w / 2);
                var top = (screen.height / 2) - (h / 2);
                var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no,scrollbars=1, resizable=1,copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
     
            }
     
            function PartialPost() {
                try {
                    __doPostBack('<%=this.btnTrigger.UniqueID %>', '');
                }
                catch (err) { }
            }
     
            function ExportToPDF(val, RepId) {           
                var padfpath = document.getElementById("hndPdfpath");
                padfpath.value = val;
                document.getElementById("hndRepId").value = RepId;
                __doPostBack('<%=this.btnUpdateLastAccessForReport.UniqueID %>', '');          
                __doPostBack('<%=this.btnExportPDF.UniqueID %>', '');
            }
            function OnAdminDashBoardClose(oWnd, args) {          
                //get the transferred arguments
                var arg = args.get_argument();
                if (arg) {
                    if (arg.NotInitialize == true) {
                        document.getElementById('hdnCalNotInitializedDiv').value = 1;
                        $('#CalNotInitializedDiv').show();
                    }
                    else {
                        document.getElementById('hdnCalNotInitializedDiv').value = 0;
                        $('#CalNotInitializedDiv').hide();
                    }
                    if (arg.LastPosted == true) {
                        document.getElementById('hdnLastPostedDiv').value = 1;
                        $('#LastPostedDiv').show();
                    }
                    else {
                        document.getElementById('hdnLastPostedDiv').value = 0;
                        $('#LastPostedDiv').hide();
                    }
                }
            }
            function PartialPostRebind() {
                try {              
                    __doPostBack('<%=this.btnRebind.UniqueID %>', '');
                }
                catch (err) { }
            }
            function RefreshGrid() {
                try {              
                    __doPostBack('<%=this.btnRefreshGrid.UniqueID %>', '');
                }
                catch (err) { }
            }
            function RefreshGridForWorkFlow(sender, eventArgs) {           
                try {
                    var arg = eventArgs.get_argument();
                    if (arg) {
     
                        __doPostBack('<%=this.btnRefreshGrid.UniqueID %>', '');
                    }
                }
                catch (err) { }
            }
            function RefreshReportGrid(sender, eventArgs) {
                try {
                    var arg = eventArgs.get_argument();
                    if (arg) {
     
                        __doPostBack('<%=this.btnRefreshRptGrid.UniqueID %>', '');
                    }
                }
                catch (err) { }
            }
            function RefreshQueryGrid(sender, eventArgs) {
                try {
                    var arg = eventArgs.get_argument();
                    if (arg) {
     
                        __doPostBack('<%=this.btnRefreshQueryGrid.UniqueID %>', '');
                    }
                }
                catch (err) { }
            }
            function RefreshDeletedReportGrid(sender, eventArgs) {
                try {
                    var arg = eventArgs.get_argument();
                    if (arg) {
     
                        __doPostBack('<%=this.btnRefreshDeletedReportGrid.UniqueID %>', '');
                    }
                }
                catch (err) { }
            }
            function RefreshDeletedQueryGrid(sender, eventArgs) {
                try {
                    var arg = eventArgs.get_argument();
                    if (arg) {
     
                        __doPostBack('<%=this.btnRefreshDeletedQueryGrid.UniqueID %>', '');
                    }
                }
                catch (err) { }
            }
            function Datecompare() {
                var oWnd = radalert("End date must be greater than start date", 300, 100, "Message from My MyProject Portal", '', null);
                oWnd.get_popupElement().style.zIndex = 100000;
     
                return false;
            }
     
        </script>
        <style type="text/css">
            #__tab_mainContent_CalendarAdmin_TbHome
            {
                width: 200px !important;
            }
            .style1
            {
                width: 230px;
            }
             
            
        .customprintbutton
        {
            background-image: url("../Images/clear_cross.png") !important;
        }
        .customprintbutton:hover
        {
            background: url("../Images/clear_cross.png") 0 -26px !important;
        }   
        .masterFormDiv {
        min-height: 46em;
        width: 1240px !important;
    }
    .masterSubMainDiv {
        background-color: #EFF2F3;
        border: 1px solid #C0C0C0;
        height: 100%;
        min-height: 46em;
        width: 1240px !important;
    }
    div.RadGrid_Outlook { margin: 1px auto;}
     
        </style>
         
        <script type="text/javascript">
            function openWin(val) {
                var oWnd = radopen("ManageDivision.aspx?ActionType=" + val + "", "ManageDivisions");
            }
            function openSubDivWin(val) {
                var oWnd = radopen("ManageSubDivision.aspx?ActionType=" + val + "", "ManageSubDivisions");
            }
            function openWinDesigneeAssignee(val) {
                var oWnd = radopen("AssigneeList.aspx?Designee=true&ContactId=" + val + "", "AssigneeList");
            }
            function openWinReviewerAssignee(val) {
                var oWnd = radopen("AssigneeList.aspx?Reveiwer=true&ContactId=" + val + "", "AssigneeList");
            }
            function openWinReviewerDivision(val) {
                var oWnd = radopen("ReviewerDivisions.aspx?ContactId=" + val + "", "ReviewerDivision");
            }
            function openWinDashboardScreenSetup() {
                var oWnd = radopen("../DashboardScreenSetup.aspx?Mode=1", "DashboardScreenSetup");
            }
            function openWinReportConfiguration() {
                var oWnd = radopen("../Report/ReportConfig.aspx", "ReportConfigurator");
                //oWnd.add_BeforeClose(onBeforeClose);
            }
             
            function openWinReportDashboard() {
                var oWnd = radopen("../Report/ThreeStepWizard.aspx?edit=0", "ReportWizard");
                setTimeout(function () { oWnd.setActive(true); }, 0);
     
                var ReportWnd = oWnd.get_windowManager().getWindowByName("ReportConfigurator");
                if (!ReportWnd.isClosed())
                    ReportWnd.Hide();
            }
            function openWinSubReportConfiguration(val) {
                var oWnd = radopen("../Report/ReportConfig.aspx?id=" + val + "", "ReportConfigurator");
            }
            function openWinSubReportConfigurationForReport(val, repid) {
                var oWnd = radopen("../Report/ReportConfig.aspx?id=" + val + "&repId=" + repid.toString() + "", "ReportConfigurator");
            }
            function openWinStandardReport() {
                var oWnd = radopen("../Reporting/StandardReport.aspx", "ReportStandardReport");           
            }
            function openWinStandardCalendarReport(val) {          
                var oWnd = radopen("../Reporting/StandardReport.aspx?mode=" + val + "", "ReportStandardReport");
     
            }
            /* Code Change By Hema 6 June 2013 */
            function openWinStoworkFlow(val, val1) {          
                var oWnd = radopen("../Reporting/StopWorkFlow.aspx?mode=" + val + "&id=" + val1 + "", "StopWorkFlow");
            }
            function ReopenWinStopWorkflow() {//args           
                var oManager = GetRadWindowManager();
                var oWnd = oManager.GetWindowByName("StopWorkFlow");           
                oWnd.show();
            }
            /*END - Code Change By Hema 6 June 2013 */ 
               
            function openWinstandardrpt() {
                var oWnd = radopen("../Reporting/Typeofstandardreport.aspx", "openWinstandardrpt1");
                //            setTimeout(function () { oWnd.setActive(true); }, 0);
     
                //            var ReportWnd = oWnd.get_windowManager().getWindowByName("ReportConfigurator");
                //            if (!ReportWnd.isClosed())
                //                ReportWnd.Hide();
     
            }
            /*---------------------------Three Step Report Rad Window Functions-------------------------------------------*/
            function OpenWindow(name) {
                radopen(null, name);
            }
     
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow; //IE (and Moz as well)
     
                return oWindow;
            }
     
            function Close() {//args
                GetRadWindow().close();
            }
     
            function RunReport() {
                var oWnd = radopen("../Report/ReportConfig.aspx?runreport=1", "ReportConfigurator");
            }
     
            /*-------------------------------------------------------------------------------------------------------------*/
            //for adv. search
            function openWinReportAdvSearch() {
                var oWnd = radopen("SearchCriteriaForReports.aspx", "ReportSearch");
            }
            function openWinReportAdvQuerySearch() {
                var oWnd = radopen("SearchCriteriaForQuery.aspx", "QuerySearch");
            }
            function openWinDeletedReportAdvSearch() {
                var oWnd = radopen("SearchCriteriaForDeletedReports.aspx", "DelReportSearch");
            }
            function openWinDeletedQueryAdvSearch() {
                var oWnd = radopen("SearchCriteriaForDeletedQuery.aspx", "DelQuerySearch");
            }
            function GetConfirmForQueryDelete() {
                radconfirm("Are you sure you want to inactivate the selected Query/Queries?", ConfirmQueryCallbackFn, 430, 130, null, "Message from My MyProject Portal");
            }
            function GetConfirmForRptDelete() {
                radconfirm("Are you sure you want to inactivate the selected Report(s)?", ConfirmRptCallbackFn, 410, 120, null, "Message from My MyProject Portal");
            }
     
            function GetConfirmForActivateQuery() {
                radconfirm("Are you sure you want to activate the selected Query/Queries?", ConfirmActivateQueryCallbackFn, 430, 130, null, "Message from My MyProject Portal");
            }
            function ConfirmActivateQueryCallbackFn(arg) {
     
                if (arg) {
                    __doPostBack('<%=this.btnActivateQuery.UniqueID %>', '');
                }
                else {
                    __doPostBack('<%=this.btnRefreshDeletedQueryGrid.UniqueID %>', '');
                }
            }
     
            function GetConfirmForActivateReport() {
                radconfirm("Are you sure you want to activate the selected Report(s)?", ConfirmActivateReportCallbackFn, 410, 120, null, "Message from My MyProject Portal");
            }
            function ConfirmActivateReportCallbackFn(arg) {
     
                if (arg) {
                    __doPostBack('<%=this.btnActivateReport.UniqueID %>', '');
                }
                else {
                    __doPostBack('<%=this.btnRefreshDeletedReportGrid.UniqueID %>', '');
                }
            }
     
            function GetConfirmForRptName(val) {
                Telerik.Web.UI.RadWindowUtils.Localization =
                {
                    "OK": "Yes",
                    "Cancel": "No"
                };
                var ownd = radconfirm("Do you wish to open the Excel report?", ConfirmRptNameCallbackFn, 360, 130, null, "Message from My MyProject Portal");
                Telerik.Web.UI.RadWindowUtils.Localization =
                {
                    "OK": "OK",
                    "Cancel": "Cancel"
                };
                 
                function ConfirmRptNameCallbackFn(arg) {
     
                    if (arg) {
     
                        ExportToPDF(val);
                    }
                    else {
                        __doPostBack('<%=this.btnRefreshQueryGrid.UniqueID %>', '');
                    }
                }
     
            }
     
            
     
            function ConfirmQueryCallbackFn(arg) {
     
                if (arg) {
                    __doPostBack('<%=this.btnDeleteQuery.UniqueID %>', '');
                }
                else {
                    __doPostBack('<%=this.btnRefreshQueryGrid.UniqueID %>', '');
                }
            }
            function ConfirmRptCallbackFn(arg) {
     
                if (arg) {
                    __doPostBack('<%=this.btnDeleteRpt.UniqueID %>', '');
                }
                else {
                    __doPostBack('<%=this.btnRefreshRptGrid.UniqueID %>', '');
                }
            }
            function GetAlertToInactivateQuery() {
                radalert("Select at least one query to inactivate.", 350, 100, "Message from My MyProject Portal");
            }
            function GetAlertForToInactivateReport() {
                radalert("Select at least one report to inactivate.", 350, 100, "Message from My MyProject Portal");
            }
            function GetAlertForToActivateQuery() {
                radalert("Select at least one query to activate.", 350, 100, "Message from My MyProject Portal");
            }
            function GetAlertForToActivateReport() {
                radalert("Select at least one report to activate.", 350, 100, "Message from My MyProject Portal");
            }
     
            function NavigateToDownloadExcelViewver() {          
                var link = '<%=System.Configuration.ConfigurationManager.AppSettings["ExcelViewerLink"] %>';
                    window.open(link , '_blank', 'toolbar=1,location=1,menubar=1,resizable=1');
            }
     
            $(document).ready(function () {
     
                var padfpath = document.getElementById("hdnpadfpathstring").value;
                if (padfpath) {
                    ExportToPDF(padfpath);
                }
            });
     
     
     
        </script>
    </asp:Content>
    <asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="true">
        </asp:ToolkitScriptManager>
        <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"
            Skin="Web20"></telerik:RadFormDecorator>
            <br />
            <br />
        <table>
            <tr>
                <td>
                    <div style="padding-left: 10px;">
                        <asp:Button ID="btnCreatenewreport" Text="Create New Report" runat="server" OnClientClick="openWinReportDashboard(); return false;" />  
                        <asp:Button ID="btnstandardreport" Text="Run Standard Report" runat="server" Visible="false"  OnClientClick="openWinstandardrpt(); return false;" />
                    </div>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td>
                </td>
                <td align="right" valign="bottom" style="padding-right: 10px">
                    <asp:HiddenField ID="hdnCalNotInitializedDiv" ClientIDMode="Static" runat="server" />
                    <asp:HiddenField ID="hdnLastPostedDiv" ClientIDMode="Static" runat="server" />
                    <asp:HiddenField ID="hdnSavedReportsDiv" ClientIDMode="Static" runat="server" />
                    <asp:HiddenField ID="hdnQueryIDs" runat="server" />
                    <asp:HiddenField ID="hdnpadfpathstring" runat="server" ClientIDMode ="Static" />
                </td>
            </tr>
            <tr>
                <td style="margin-left: 5px;" colspan="2">
                    <div style="visibility: hidden; height: 1px;">
                     
                         
                        <input id="btnTrigger" runat="server" style="display: none;" type="button" onserverclick="btnTrigger_Click" />
                        <input id="btnRebind" runat="server" style="display: none;" type="button" onserverclick="btnRebind_Click" />
                        <input id="btnRefreshGrid" runat="server" style="display: none;" type="button" onserverclick="btnRefreshGrid_Click" />
                        <input id="AsyncActionType" runat="server" style="display: none;" type="hidden" clientidmode="Static"
                            value="" />
                        <input id="tabMode" runat="server" style="display: none;" type="hidden" value=""
                            clientidmode="Static" />
                        <input id="btnRefreshQueryGrid" runat="server" style="display: none;" type="button"
                            onserverclick="btnRefreshQueryGrid_Click" />
                        <input id="btnRefreshRptGrid" runat="server" style="display: none;" type="button"
                            onserverclick="btnRefreshRptGrid_Click" />
                        <input id="btnRefreshDeletedQueryGrid" runat="server" style="display: none;" type="button"
                            onserverclick="btnRefreshDeletedQueryGrid_Click" />
                        <input id="btnRefreshDeletedReportGrid" runat="server" style="display: none;" type="button"
                            onserverclick="btnRefreshDeletedReportGrid_Click" />
                        <input id="btnDeleteQuery" runat="server" style="display: none;" type="button" onserverclick="btnDeleteQuery_Click" />
                        <input id="btnDeleteRpt" runat="server" style="display: none;" type="button" onserverclick="btnDeleteRpt_Click" />
                        <input id="btnActivateQuery" runat="server" style="display: none;" type="button" onserverclick="btnActivateQuery_Click" />
                        <input id="btnActivateReport" runat="server" style="display: none;" type="button" onserverclick="btnActivateReport_Click" />
                        <input id="btnUpdateLastAccessForReport" runat="server" style="display: none;" type="button" onserverclick="btnUpdateLastAccessForReport_Click" />
                    </div>
                    <asp:TabContainer ID="CalendarAdmin" runat="server" ActiveTabIndex="1" Width="100%"
                        OnClientActiveTabChanged="PartialPost">
                        <asp:TabPanel runat="server" HeaderText="Home" ID="TbHome" Visible="false">
                            <HeaderTemplate>
                                Delinquent Calendar Users
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="HomeUpdatePanel" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <div id="CalendarAdminHomePanel" runat="server" clientidmode="Static">
                                            <table width="100%">
                                                <tr>
                                                    <td align="left">
                                                        <div style="text-align: right; display: none;">
                                                            <asp:Button ID="btnDashbord" runat="server" Text="Dashboard Screen Setup" OnClientClick="openWinDashboardScreenSetup(); return false;" /></div>
                                                        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem"
                                                            Skin="Windows7" Width="100%">
                                                            <Items>
                                                                <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Calendars Not Initialized    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 1 of 2</td></tr></table>" Expanded="True" Value="calendarnotinitialisedmain">
                                                                    <Items>
                                                                        <telerik:RadPanelItem runat="server" Value="calendarnotinitialised">
                                                                            <ItemTemplate>
                                                                                <div runat="server" id="CalNotInitializedDiv" clientidmode="Static">
                                                                                    <asp:Panel ID="panelCalNotInitializedDiv" runat="server" ScrollBars="Vertical">
                                                                                        <Calendar:CalendarNotInitialized ID="CalendarNotInit" runat="server" />
                                                                                    </asp:Panel>
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </telerik:RadPanelItem>
                                                                    </Items>
                                                                </telerik:RadPanelItem>
                                                                <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Last Posted Date > 30 Days    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 2 of 2</td></tr></table>" Expanded="True" Value="lastposteddatemain">
                                                                    <Items>
                                                                        <telerik:RadPanelItem runat="server" Value="lastposteddate">
                                                                            <ItemTemplate>
                                                                                <div runat="server" id="LastPostedDiv" clientidmode="Static">
                                                                                    <asp:Panel ID="panellastposteddiv" runat="server" ScrollBars="Vertical">
                                                                                        <LastPostedDate:LastPostedDate30Days ID="LastPostedDates" runat="server" />
                                                                                    </asp:Panel>
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </telerik:RadPanelItem>
                                                                    </Items>
                                                                </telerik:RadPanelItem>
                                                            </Items>
                                                        </telerik:RadPanelBar>
                                                    </td>
                                                    <%--  <td valign="top">
                                                        <div runat="server" id="SavedReportsDiv" clientidmode="Static">
                                                            Saved Reports and Queries
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <div class="liquid-round" style="float: left; width: 100%">
                                                                            <div class="top">
                                                                                <span></span>
                                                                            </div>
                                                                            <div class="center-content">
                                                                                <asp:Repeater ID="rptReports" runat="server">
                                                                                    <FooterTemplate>
                                                                                        <tr>
                                                                                            <td colspan="2">
                                                                                                <asp:LinkButton runat="server" ID="lnkBtnMoreReports">more reports....</asp:LinkButton>
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                        </Table></FooterTemplate>
                                                                                    <HeaderTemplate>
                                                                                        <table class="plane-table">
                                                                                            <tr>
                                                                                                <td colspan="4" align="center">
                                                                                                    <b><u>Saved Reports</u></b>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <br />
                                                                                    </HeaderTemplate>
                                                                                    <ItemTemplate>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:Image ID="Img" runat="server" ImageUrl="~/Images/Arrow.jpg" />
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </ItemTemplate>
                                                                                </asp:Repeater>
                                                                            </div>
                                                                            <div class="bottom">
                                                                                <span></span>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="liquid-round" style="float: left; width: 100%">
                                                                            <div class="top">
                                                                                <span></span>
                                                                            </div>
                                                                            <div class="center-content">
                                                                                <asp:Repeater ID="rptQuerys" runat="server">
                                                                                    <FooterTemplate>
                                                                                        <tr>
                                                                                            <td colspan="2">
                                                                                                <asp:LinkButton runat="server" ID="lnkBtnMoreReports">more queries....</asp:LinkButton>
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                        </Table></FooterTemplate>
                                                                                    <HeaderTemplate>
                                                                                        <table class="plane-table">
                                                                                            <tr>
                                                                                                <td colspan="4" align="center">
                                                                                                    <b><u>Saved Queries</u></b>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <br />
                                                                                    </HeaderTemplate>
                                                                                    <ItemTemplate>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:Image ID="Img" runat="server" ImageUrl="~/Images/Arrow.jpg" />
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </ItemTemplate>
                                                                                </asp:Repeater>
                                                                            </div>
                                                                            <div class="bottom">
                                                                                <span></span>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                    </td>--%>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="loading-indicator" id="divAdminHomeLoading" clientidmode="Static" style="display: none;"
                                            runat="server">
                                        </div>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </asp:TabPanel>
                        <asp:TabPanel runat="server" HeaderText="Reports" ID="TbReports" Width="100%">
                            <HeaderTemplate>
                                Saved Queries and Reports
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnlRptConfiguration" runat="server" ClientIDMode="Static">
                                            <telerik:RadPanelBar runat="server" ID="RadPanelBarSavedQuery" ExpandMode="SingleExpandedItem"
                                                Skin="Windows7" Width="100%">
                                                <Items>
                                                    <%-- Active Queries Tab Panel----%>
                                                    <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Active Queries    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 1 of 4</td></tr></table>" Expanded="True" Value="SavedQueriesdmain" >
                                                        <Items>
                                                            <telerik:RadPanelItem runat="server" Value="SavedQueries">
                                                                <ItemTemplate>
                                                                    <asp:HiddenField ID="hdnSearch" runat="server" />
                                                                    <div class="validator">
                                                                        <asp:Label ID="lblreport" runat="server" Visible="False"></asp:Label>
                                                                        <br />
                                                                    </div>
                                                                    <div>
                                                                        <div>
                                                                            <telerik:RadGrid ID="radgrdReport" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                                                                                GridLines="None" BorderStyle="None" OnNeedDataSource="radgrdReport_NeedDataSource" AllowPaging="True" AllowSorting="true"
                                                                                AllowMultiRowSelection="true" Width="99.5%" Skin="Outlook" EnableLinqExpressions="False"
                                                                                OnItemCommand="radgrdReport_ItemCommand" OnItemDataBound="radgrdReport_ItemDataBound" OnItemCreated="radgrdReport_ItemCreated" OnPreRender="radgrdReport_PreRender">
                                                                                <ItemStyle Wrap ="true" />
                                                                                <HeaderStyle wrap="true" Height="30px"/>
                                                                                <ClientSettings>
                                                                                    <Selecting AllowRowSelect="True"  />
                                                                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />                                                                   
                                                                                </ClientSettings>
                                                                                <SortingSettings EnableSkinSortStyles="true" SortToolTip="Click here to sort"/>                                                                          
                                                                                <MasterTableView DataKeyNames="ReportConfigurationId" CommandItemDisplay="Top">
                                                                                    <PagerStyle AlwaysVisible="true" />
                                                                                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                                                    </RowIndicatorColumn>
                                                                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                                                    </ExpandCollapseColumn>                                                                                                                                                               
                                                                                    <Columns>
                                                                                        <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column"
                                                                                            UniqueName="Select"  HeaderStyle-Width="3%" >
                                                                                        </telerik:GridClientSelectColumn>                                                                                                                                                                      
                                                                                        <telerik:GridTemplateColumn Visible="false" HeaderStyle-Width="15%">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblReportConfigurationId" runat="server" Text='<%# Bind("ReportConfigurationId") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="StopWorkflow" DataField="StopWorkflow" HeaderText="Scheduled <br/>(click to edit)" SortExpression="StopWorkflow"
                                                                                            FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="16%">
                                                                                            <HeaderTemplate>
                                                                                                Scheduled (click to edit)
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:LinkButton ID="hypStopWorkflow" runat="server" Text='<%# Bind("StopWorkflow")  %>' Width="100px"></asp:LinkButton>                                                                                           
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="EmailScheduleTypeId" DataField="EmailScheduleTypeId"
                                                                                            SortExpression="EmailScheduleTypeId" FilterControlAltText="Filter ReportConfigurationId column"
                                                                                            Visible="false">
                                                                                            <HeaderTemplate>
                                                                                                Query ID #
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblEmailScheduleTypeId" runat="server" Text='<%# Bind("EmailScheduleTypeId")  %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="ReportConfigurationId" DataField="ReportConfigurationId"
                                                                                            SortExpression="ReportConfigurationId" FilterControlAltText="Filter ReportConfigurationId column"
                                                                                            Visible="false">
                                                                                            <HeaderTemplate>
                                                                                                Query ID #
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:LinkButton ID="hypReportConfigurationId" runat="server" Text='<%# Bind("ReportConfigurationId")  %>'></asp:LinkButton>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="QueryCustomId" DataField="QueryCustomId" HeaderText=" Query ID<br/>(click to view)"
                                                                                            SortExpression="QueryCustomId" FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="16%">
                                                                                            <HeaderTemplate>
                                                                                                Query ID (click to view)
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:LinkButton ID="hypQueryCustomId" runat="server" Text='<%# Bind("QueryCustomId")  %>' Width="150px"></asp:LinkButton>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="Name" DataField="Name" SortExpression="Name" HeaderText="Query Name<br/>(click to view)"
                                                                                            FilterControlAltText="Filter Name column" HeaderStyle-Width="34%" ItemStyle-CssClass="wrapwords">
                                                                                            <HeaderTemplate>
                                                                                                Query Name (click to view)
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblReportName" runat="server" Text='<%# Bind("Name") %>' Visible="false"></asp:Label>
                                                                                                <asp:LinkButton ID="lnkQueryName" runat="server" Text='<%# Bind("Name") %>' cssClass="wrapwords" Width="280px"></asp:LinkButton>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date Created<br/>(US/Central Time)"
                                                                                            HeaderTooltip="Date Created (US/Central Time)" UniqueName="CreatedDate" DataFormatString="{0:dd MMM yyyy hh:mm:ss}"
                                                                                            SortExpression="CreatedDate" FilterControlAltText="Filter CreatedDate column" HeaderStyle-Width="16%">
                                                                                        </telerik:GridBoundColumn>
                                                                                        <telerik:GridBoundColumn DataField="LastAccessedDate" HeaderText="Last Accessed<br/>(US/Central Time)"
                                                                                            HeaderTooltip="Last Accessed (US/Central Time)" UniqueName="LastAccessedDate"
                                                                                            DataFormatString="{0:dd MMM yyyy hh:mm:ss}" SortExpression="LastAccessedDate"
                                                                                            FilterControlAltText="Filter StartDate column" HeaderStyle-Width="16%">
                                                                                        </telerik:GridBoundColumn>
                                                                                    </Columns>                                                                              
                                                                                    <CommandItemTemplate>
                                                                                        <asp:Panel ID="pnlreports" runat="server" DefaultButton="btnSearch">
                                                                                            <table align="left">
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <telerik:RadButton ID="btnDeleteQuery" runat="server" Text="Inactivate" CommandName="Delete"
                                                                                                            TabIndex="2">
                                                                                                        </telerik:RadButton>
                                                                                                           
                                                                                                        Click on a column heading to sort the table by that column
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                            <table align="right">
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <telerik:RadTextBox ID="txtSearch" runat="server" Visible="false" Width="150px">
                                                                                                        </telerik:RadTextBox
                                                                                                         
                                                                                                        <telerik:RadButton ID="btnSearch" AutoPostBack="false" runat="server" Text="Search"
                                                                                                            OnClientClicked="openWinReportAdvQuerySearch">
                                                                                                        </telerik:RadButton>
                                                                                                        <%-- <telerik:RadButton ID="btnSearch" runat="server" AutoPostBack="true" ButtonType="StandardButton"
                                                                                                            CausesValidation="true" CommandName="btnSearch" ToggleType="CustomToggle" ValidationGroup="libimage">
                                                                                                            <ToggleStates>
                                                                                                                <telerik:RadButtonToggleState PrimaryIconCssClass="rbSearch" Text="Search" />
                                                                                                                <telerik:RadButtonToggleState PrimaryIconCssClass="rbCancel" Text="Clear" />
                                                                                                            </ToggleStates>
                                                                                                        </telerik:RadButton>--%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </asp:Panel>
                                                                                    </CommandItemTemplate>
                                                                                    <EditFormSettings>
                                                                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                                    </EditColumn>
                                                                                    </EditFormSettings>                                                                               
                                                                                </MasterTableView>
                                                                                <FilterMenu EnableImageSprites="False">
                                                                                </FilterMenu>
                                                                                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                                                </HeaderContextMenu>
                                                                                
                                                                            </telerik:RadGrid>
                                                                            <br />
                                                                        </div>
                                                                </ItemTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
     
                                                    <%-- Active Reports Tab Panel----%>
                                                    <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Active Reports    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 2 of 4</td></tr></table>" Expanded="True" Value="Savedreportsdmain">
                                                        <Items>
                                                            <telerik:RadPanelItem runat="server" Value="SavedReports">
                                                                <ItemTemplate>
                                                                    <div class="validator">
                                                                        <asp:Label ID="lblQuery" runat="server" Visible="False"></asp:Label>
                                                                        <br />
                                                                    </div>
                                                                    <div id ="divRepGrid">
                                                                        <telerik:RadGrid ID="radgrdQuery" runat="server" AutoGenerateColumns="False" CellSpacing="0" AllowSorting="true"
                                                                            AllowMultiRowSelection="true" Width="99.5%" GridLines="None" BorderStyle="None" OnNeedDataSource="radgrdQuery_NeedDataSource"
                                                                            OnItemCommand="radgrdQuery_ItemCommand" AllowPaging="True" Skin="Outlook" OnItemDataBound="radgrdQuery_ItemDataBound" OnItemCreated="radgrdQuery_ItemCreated" OnPreRender="radgrdQuery_PreRender"
                                                                            EnableLinqExpressions="False">
                                                                            <FooterStyle Height="25px" />
                                                                            <ItemStyle Wrap="true" />
                                                                            <HeaderStyle Wrap="true" />
                                                                            <ClientSettings>
                                                                                <Selecting AllowRowSelect="True" />
                                                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />                                                                           
                                                                            </ClientSettings>
                                                                            <SortingSettings EnableSkinSortStyles="true" SortToolTip="Click here to sort" />
                                                    
                                                                            <MasterTableView CommandItemDisplay="Top">
                                                                                <PagerStyle AlwaysVisible="true" />                                                                           
                                                                                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                                                </RowIndicatorColumn>
                                                                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                                                </ExpandCollapseColumn>
                                                                                <Columns>
                                                                                    <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column"
                                                                                        UniqueName="Select" HeaderStyle-Width="3%">
                                                                                    </telerik:GridClientSelectColumn>
                                                                                    <telerik:GridTemplateColumn Visible="false" HeaderStyle-Width="13%">
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportConfigurationId" runat="server" Text='<%# Bind("ReportCutomId") %>'></asp:Label>
                                                                                            <asp:Label ID="lblReportId" runat="server" Text='<%# Bind("ReportConfigurationId") %>'></asp:Label>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="ReportCutomId" DataField="ReportCutomId"  HeaderText=" Report ID<br/> (click to view)"
                                                                                        SortExpression="ReportCutomId" FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="14%">
                                                                                        <HeaderTemplate>
                                                                                            Report ID (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportCustomId" runat="server" Text='<%# Bind("ReportCutomId")  %>' Visible="false"></asp:Label>                                                                                   
                                                                                            <asp:LinkButton ID="lnkReportCustomId" runat="server" Text='<%# Bind("ReportCutomId")  %>' Width="120px"></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="PDFCustomId" FilterControlAltText="Filter Name column"
                                                                                        DataField="PDFCustomId" SortExpression="PDFCustomId" Visible="false" HeaderStyle-Width="14%">
                                                                                        <HeaderTemplate>
                                                                                            PDF
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblPDFPath" runat="server" Text='<%# Bind("PDFPath") %>' Visible="false"></asp:Label>
                                                                                            <asp:LinkButton ID="lbtnPdfName" runat="server" Text='<%# Bind("PDFCustomId","P{0}") %>'></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="Name" FilterControlAltText="Filter Name column" HeaderText=" Report Name<br/> (click to view)"
                                                                                        DataField="Name" SortExpression="Name"  HeaderStyle-Width="28%" >
                                                                                        <HeaderTemplate>
                                                                                            Report Name (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportName" runat="server" Text='<%# Bind("Name") %>' Visible="false"></asp:Label>
                                                                                            <asp:LinkButton ID="lnkReportName" runat="server" Text='<%# Bind("Name")  %>' CssClass="wrapwords" Width="280px"></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="QueryName" FilterControlAltText="Filter Name column" HeaderText="Report based on the<br/> following Query<br/> (click to view)"
                                                                                        DataField="QueryName" SortExpression="QueryName"  HeaderStyle-Width="28%">
                                                                                        <HeaderTemplate>
                                                                                          Report based on the following Query (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>                                                                                       
                                                                                            <asp:Label ID="lblQueryCustomId" runat="server" Text='<%# Bind("QueryId") %>' Visible="false"></asp:Label>
                                                                                            <asp:LinkButton ID="lnkQueryName" runat="server" Text='<%# Bind("QueryName")  %>' CssClass="wrapwords" Width="280px"></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date Created<br/> (US/Central Time)"
                                                                                        HeaderTooltip="Date Created (US/Central Time)" UniqueName="CreatedDate" DataFormatString="{0:dd MMM yyyy hh:mm:ss}"
                                                                                        SortExpression="CreatedDate" FilterControlAltText="Filter CreatedDate column"  HeaderStyle-Width="14%">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="LastAccessedDate" HeaderText="Last Accessed<br/> (US/Central Time)"
                                                                                        HeaderTooltip="Last Accessed (US/Central Time)" UniqueName="LastAccessedDate"
                                                                                        DataFormatString="{0:dd MMM yyyy hh:mm:ss}" SortExpression="LastAccessedDate"
                                                                                        FilterControlAltText="Filter StartDate column"  HeaderStyle-Width="14%">
                                                                                    </telerik:GridBoundColumn>
                                                                                </Columns>
                                                                                <CommandItemTemplate>
                                                                                    <asp:Panel ID="pnlQueries" runat="server" DefaultButton="btnSearch">
                                                                                        <table align="left">
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <telerik:RadButton ID="btnDeleteReports" runat="server" Text="Inactivate" CommandName="DeleteReports"
                                                                                                        TabIndex="2">
                                                                                                    </telerik:RadButton>
                                                                                                       
                                                                                                        Click on a column heading to sort the table by that column
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                        <table align="right">
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <telerik:RadTextBox ID="txtSearch" runat="server" Width="10px" Visible="false">
                                                                                                    </telerik:RadTextBox>                                                                                                
                                                                                                    <telerik:RadButton ID="btnSearch" AutoPostBack="false" runat="server" Text="Search"
                                                                                                        OnClientClicked="openWinReportAdvSearch">
                                                                                                    </telerik:RadButton>
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </asp:Panel>
                                                                                </CommandItemTemplate>
                                                                                <EditFormSettings>
                                                                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                                    </EditColumn>
                                                                                </EditFormSettings>
                                                                                <GroupFooterTemplate>
                                                                                    abcde
                                                                                </GroupFooterTemplate>
                                                                            </MasterTableView>
                                                                            <FilterMenu EnableImageSprites="False">
                                                                            </FilterMenu>
                                                                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                                            </HeaderContextMenu>                                                                       
                                                                        </telerik:RadGrid>   
                                                                        <div style="padding-left:40%; margin:-2px 3px 1px 5px; background-color:#d6e5f3; height:20px; text-align:left; vertical-align:super;">
                                                                             Click <a href="#" id="lnkDownload" onclick="javascript:NavigateToDownloadExcelViewver();return false;"> here </a> to download and install a free Excel File viewer
                                                                        </div>                                                               
                                                                        <br />
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
     
                                                    <%-- Inactive Queries Tab Panel----%>
                                                    <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Inactive Queries    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 3 of 4</td></tr></table>" Expanded="false" Value="InactiveQueriesAdmin">
                                                        <Items>
                                                            <telerik:RadPanelItem runat="server" Value="InactiveQueries">
                                                                <ItemTemplate>
                                                                    <asp:HiddenField ID="hdnSearch1" runat="server" />
                                                                    <div class="validator">
                                                                        <asp:Label ID="lblInactiveQuery" runat="server" Visible="False"></asp:Label>
                                                                        <br />
                                                                    </div>
                                                                    <div>
                                                                        <div>
                                                                            <telerik:RadGrid ID="radGridInactiveQuery" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                                                                                GridLines="None" BorderStyle="None" OnNeedDataSource="radGridInactiveQuery_NeedDataSource" AllowPaging="True" AllowSorting="true"
                                                                                AllowMultiRowSelection="true" Width="99.5%" Skin="Outlook" EnableLinqExpressions="False"
                                                                                OnItemCommand="radGridInactiveQuery_ItemCommand" OnItemDataBound="radGridInactiveQuery_ItemDataBound" OnItemCreated="radGridInactiveQuery_ItemCreated" OnPreRender="radGridInactiveQuery_PreRender">
                                                                                <ItemStyle Wrap ="true" />
                                                                                <HeaderStyle wrap="true"/>
                                                                                <ClientSettings>
                                                                                    <Selecting AllowRowSelect="True"  />
                                                                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />                                                                   
                                                                                </ClientSettings>
                                                                                <SortingSettings EnableSkinSortStyles="true" SortToolTip="Click here to sort" />                                                                          
                                                                                <MasterTableView DataKeyNames="ReportConfigurationId" CommandItemDisplay="Top">
                                                                                    <PagerStyle AlwaysVisible="true" />
                                                                                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                                                    </RowIndicatorColumn>
                                                                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                                                    </ExpandCollapseColumn>
                                                                                     
                                                                                    <Columns>
                                                                                        <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column"
                                                                                            UniqueName="Select" HeaderStyle-Width="3%" >
                                                                                        </telerik:GridClientSelectColumn>                                                                                                                                                                      
                                                                                        <telerik:GridTemplateColumn Visible="false" HeaderStyle-Width="15%">
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblReportConfigurationId" runat="server" Text='<%# Bind("ReportConfigurationId") %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="StopWorkflow" DataField="StopWorkflow" HeaderText=" " SortExpression="StopWorkflow"
                                                                                            FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="16%" ItemStyle-ForeColor="Gray">
                                                                                            <HeaderTemplate>
                                                                                                  
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblStopWorkflow" runat="server" Text = "Off" Width="100px"></asp:Label>                                                                                         
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="EmailScheduleTypeId" DataField="EmailScheduleTypeId"
                                                                                            SortExpression="EmailScheduleTypeId" FilterControlAltText="Filter ReportConfigurationId column"
                                                                                            Visible="false">
                                                                                            <HeaderTemplate>
                                                                                                Query ID #
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblEmailScheduleTypeId" runat="server" Text='<%# Bind("EmailScheduleTypeId")  %>'></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="ReportConfigurationId" DataField="ReportConfigurationId"
                                                                                            SortExpression="ReportConfigurationId" FilterControlAltText="Filter ReportConfigurationId column"
                                                                                            Visible="false">
                                                                                            <HeaderTemplate>
                                                                                                Query ID #
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:LinkButton ID="hypReportConfigurationId" runat="server" Text='<%# Bind("ReportConfigurationId")  %>' Enabled="false"></asp:LinkButton>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="QueryCustomId" DataField="QueryCustomId" HeaderText=" Query ID<br/>(click to view)"
                                                                                            SortExpression="QueryCustomId" FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="16%" ItemStyle-ForeColor="Gray">
                                                                                            <HeaderTemplate>
                                                                                                Query ID (click to view)
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblQueryCustomId" runat="server" Text='<%# Bind("QueryCustomId")  %>' Width="100px" Enabled="false"></asp:Label>
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridTemplateColumn UniqueName="Name" DataField="Name" SortExpression="Name" HeaderText="Query Name<br/>(click to view)"
                                                                                            FilterControlAltText="Filter Name column" HeaderStyle-Width="34%" ItemStyle-CssClass="wrapwords" ItemStyle-ForeColor="Gray">
                                                                                            <HeaderTemplate>
                                                                                                Query Name (click to view)
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:Label ID="lblReportName" runat="server" Text='<%# Bind("Name") %>' ></asp:Label>                                                                                           
                                                                                            </ItemTemplate>
                                                                                        </telerik:GridTemplateColumn>
                                                                                        <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date Created<br/>(US/Central Time)"
                                                                                            HeaderTooltip="Date Created (US/Central Time)" UniqueName="CreatedDate" DataFormatString="{0:dd MMM yyyy hh:mm:ss}"
                                                                                            SortExpression="CreatedDate" FilterControlAltText="Filter CreatedDate column" HeaderStyle-Width="16%" ItemStyle-ForeColor="Gray">
                                                                                        </telerik:GridBoundColumn>
                                                                                        <telerik:GridBoundColumn DataField="LastAccessedDate" HeaderText="Last Accessed<br/>(US/Central Time)"
                                                                                            HeaderTooltip="Last Accessed (US/Central Time)" UniqueName="LastAccessedDate"
                                                                                            DataFormatString="{0:dd MMM yyyy hh:mm:ss}" SortExpression="LastAccessedDate"
                                                                                            FilterControlAltText="Filter StartDate column" HeaderStyle-Width="16%" ItemStyle-ForeColor="Gray">
                                                                                        </telerik:GridBoundColumn>
                                                                                    </Columns>                                                                              
                                                                                    <CommandItemTemplate>
                                                                                        <asp:Panel ID="pnlInactiveQueries" runat="server" DefaultButton="btnSearchDeletedQueries">
                                                                                            <table align="left">
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <telerik:RadButton ID="btnActivateDeletedQuery" runat="server" Text="Activate" CommandName="ActivateQuery"
                                                                                                            TabIndex="2">
                                                                                                        </telerik:RadButton>
                                                                                                           
                                                                                                        Click on a column heading to sort the table by that column
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                            <table align="right">
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <telerik:RadTextBox ID="txtSearch" runat="server" Visible="false" Width="150px">
                                                                                                        </telerik:RadTextBox
                                                                                                         
                                                                                                        <telerik:RadButton ID="btnSearchDeletedQueries" AutoPostBack="false" runat="server" Text="Search"
                                                                                                            OnClientClicked="openWinDeletedQueryAdvSearch">
                                                                                                        </telerik:RadButton>
                                                                                                        <%-- <telerik:RadButton ID="btnSearch" runat="server" AutoPostBack="true" ButtonType="StandardButton"
                                                                                                            CausesValidation="true" CommandName="btnSearch" ToggleType="CustomToggle" ValidationGroup="libimage">
                                                                                                            <ToggleStates>
                                                                                                                <telerik:RadButtonToggleState PrimaryIconCssClass="rbSearch" Text="Search" />
                                                                                                                <telerik:RadButtonToggleState PrimaryIconCssClass="rbCancel" Text="Clear" />
                                                                                                            </ToggleStates>
                                                                                                        </telerik:RadButton>--%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </asp:Panel>
                                                                                    </CommandItemTemplate>
                                                                                    <EditFormSettings>
                                                                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                                    </EditColumn>
                                                                                    </EditFormSettings>
                                                                                </MasterTableView>
                                                                                <FilterMenu EnableImageSprites="False">
                                                                                </FilterMenu>
                                                                                 <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                                            </HeaderContextMenu>
                                                                            </telerik:RadGrid>
                                                                            <br />
                                                                        </div>
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>                                              
                                                                                                       
                                                    </telerik:RadPanelItem>
     
                                                    <%-- Inactive Reports Tab Panel----%>
                                                    <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Inactive Reports    <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 4 of 4</td></tr></table>" Expanded="false" Value="Inactivereportsdmain">
                                                        <Items>
                                                            <telerik:RadPanelItem runat="server" Value="InactiveReports">
                                                                <ItemTemplate>
                                                                    <div class="validator">
                                                                        <asp:Label ID="lblInactiveReport" runat="server" Visible="False"></asp:Label>
                                                                        <br />
                                                                    </div>
                                                                    <div>
                                                                        <telerik:RadGrid ID="radGridInactiveReports" runat="server" AutoGenerateColumns="False" CellSpacing="0" AllowSorting="true"
                                                                            AllowMultiRowSelection="True" Width="99.5%" GridLines="None" BorderStyle="None" OnNeedDataSource="radGridInactiveReports_NeedDataSource"
                                                                            OnItemCommand="radGridInactiveReports_ItemCommand" AllowPaging="True" Skin="Outlook" OnItemDataBound="radGridInactiveReports_ItemDataBound" OnItemCreated="radGridInactiveReports_ItemCreated"
                                                                            OnPreRender="radGridInactiveReports_PreRender" EnableLinqExpressions="False">
                                                                            <ItemStyle Wrap="true" />
                                                                            <HeaderStyle Wrap="true" />
                                                                            <ClientSettings>
                                                                                <Selecting AllowRowSelect="True" />
                                                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />                                                                           
                                                                            </ClientSettings>
                                                                            <SortingSettings EnableSkinSortStyles="true" SortToolTip="Click here to sort"/>                                                                       
                                                                            <MasterTableView CommandItemDisplay="Top">
                                                                                <PagerStyle AlwaysVisible="true" />                                                                           
                                                                                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                                                </RowIndicatorColumn>
                                                                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                                                </ExpandCollapseColumn>                                              
                                                                                <Columns>
                                                                                    <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column"
                                                                                        UniqueName="Select" HeaderStyle-Width="3%">
                                                                                    </telerik:GridClientSelectColumn>
                                                                                    <telerik:GridTemplateColumn Visible="false" HeaderStyle-Width="13%">
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportConfigurationId" runat="server" Text='<%# Bind("ReportCutomId") %>'></asp:Label>
                                                                                            <asp:Label ID="lblReportId" runat="server" Text='<%# Bind("ReportConfigurationId") %>'></asp:Label>
                                                                                        </ItemTemplate>                                                                                   
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="ReportCutomId" DataField="ReportCutomId"  HeaderText=" Report ID<br/> (click to view)"
                                                                                        SortExpression="ReportCutomId" FilterControlAltText="Filter ReportConfigurationId column" HeaderStyle-Width="14%" ItemStyle-ForeColor="Gray">
                                                                                        <HeaderTemplate>
                                                                                            Report ID (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportCustomId" runat="server" Text='<%# Bind("ReportCutomId")  %>'></asp:Label>
                                                                                        </ItemTemplate>                                                                                   
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="PDFCustomId" FilterControlAltText="Filter Name column"
                                                                                        DataField="PDFCustomId" SortExpression="PDFCustomId" Visible="false" HeaderStyle-Width="14%">
                                                                                        <HeaderTemplate>
                                                                                            PDF
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblPDFPath" runat="server" Text='<%# Bind("PDFPath") %>' Visible="false"></asp:Label>
                                                                                            <asp:LinkButton ID="lbtnPdfName" runat="server" Text='<%# Bind("PDFCustomId","P{0}") %>'></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="Name" FilterControlAltText="Filter Name column" HeaderText=" Report Name<br/> (click to view)"
                                                                                        DataField="Name" SortExpression="Name" HeaderStyle-Width="28%" ItemStyle-ForeColor="Gray">
                                                                                        <HeaderTemplate>
                                                                                            Report Name (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportName" runat="server" Text='<%# Bind("Name") %>' CssClass="wrapwords" Width="130px"></asp:Label>                                                                                      
                                                                                        </ItemTemplate>                                                                                   
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="QueryName" FilterControlAltText="Filter Name column" HeaderText="Report based on the<br/> following Query<br/> (click to view)"
                                                                                        DataField="QueryName" SortExpression="QueryName" HeaderStyle-Width="28%" ItemStyle-ForeColor="Gray">
                                                                                        <HeaderTemplate>
                                                                                          Report based on the following Query (click to view)
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>                                                                                       
                                                                                            <asp:Label ID="lblQueryCustomId" runat="server" Text='<%# Bind("QueryId") %>' Visible="false"></asp:Label>
                                                                                            <asp:Label ID="lblQueryName" runat="server" Text='<%# Bind("QueryName")  %>' CssClass="wrapwords" Width="130px"></asp:Label>
                                                                                        </ItemTemplate>                                                                                   
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date Created<br/> (US/Central Time)"
                                                                                        HeaderTooltip="Date Created (US/Central Time)" UniqueName="CreatedDate" DataFormatString="{0:dd MMM yyyy hh:mm:ss}"
                                                                                        SortExpression="CreatedDate" FilterControlAltText="Filter CreatedDate column" HeaderStyle-Width="14%" ItemStyle-ForeColor="Gray">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="LastAccessedDate" HeaderText="Last Accessed<br/> (US/Central Time)"
                                                                                        HeaderTooltip="Last Accessed (US/Central Time)" UniqueName="LastAccessedDate"
                                                                                        DataFormatString="{0:dd MMM yyyy hh:mm:ss}" SortExpression="LastAccessedDate"
                                                                                        FilterControlAltText="Filter StartDate column" HeaderStyle-Width="14%" ItemStyle-ForeColor="Gray">
                                                                                    </telerik:GridBoundColumn>
                                                                                </Columns>
                                                                                <CommandItemTemplate>
                                                                                    <asp:Panel ID="pnlDeletedReports" runat="server" DefaultButton="btnSearchInactiveReport">
                                                                                        <table align="left">
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <telerik:RadButton ID="btnActivateDeletedReports" runat="server" Text="Activate" CommandName="ActivateReports"
                                                                                                        TabIndex="2">
                                                                                                    </telerik:RadButton>
                                                                                                       
                                                                                                        Click on a column heading to sort the table by that column
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                        <table align="right">
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <telerik:RadTextBox ID="txtSearch" runat="server" Width="10px" Visible="false">
                                                                                                    </telerik:RadTextBox>                                                                                                
                                                                                                    <telerik:RadButton ID="btnSearchInactiveReport" AutoPostBack="false" runat="server" Text="Search"
                                                                                                        OnClientClicked="openWinDeletedReportAdvSearch">
                                                                                                    </telerik:RadButton>
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </asp:Panel>
                                                                                </CommandItemTemplate>
                                                                                <EditFormSettings>
                                                                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                                    </EditColumn>
                                                                                </EditFormSettings>
                                                                            </MasterTableView>
                                                                            <FilterMenu EnableImageSprites="False">
                                                                            </FilterMenu>
                                                                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                                            </HeaderContextMenu>
                                                                        </telerik:RadGrid>
                                                                        <div style="padding-left:40%; margin:-2px 3px 1px 5px; background-color:#d6e5f3; height:20px; text-align:left; vertical-align:top;">
                                                                             Click <a href="#" id="lnkDownload" onclick="javascript:NavigateToDownloadExcelViewver();return false;"> here </a> to download and install a free Excel File viewer
                                                                        </div>
                                                                        <br />
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
     
                                                    <%-- Export List Tab Panel :: set to invisible ----%>
                                                    <telerik:RadPanelItem Text="<table width='95%' cellpadding='0' cellspacing='0'><tr><td align='left'>Export List     <span style='font-size:10px;'>(Clickable)</span></td><td align='right'>Section 3 of 3</td></tr></table>" Expanded="true" Value="exportedlist" Visible="false">
                                                        <Items>
                                                            <telerik:RadPanelItem runat="server" Value="ExportList">
                                                                <ItemTemplate>
                                                                    <div>
                                                                        <table cellpadding="1" cellspacing="2" width="100%">
                                                                            <tr>
                                                                                <td align="right">
                                                                                    <asp:Button ID="btnRefresh" runat="server" Text="Refresh" OnClick="btnRefresh_Click" />
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                    <div>
                                                                        <asp:HiddenField ID="hdnSearch" runat="server" />
                                                                        <asp:HiddenField ID="hdnReportCount" runat="server" />
                                                                        <telerik:RadGrid ID="RadgrdExportList" runat="server" AutoGenerateColumns="False"
                                                                            CellSpacing="0" Width="100%" GridLines="None" OnNeedDataSource="RadgrdExportList_NeedDataSource"
                                                                            AllowPaging="True" Skin="Outlook" OnItemDataBound="RadgrdExportList_ItemDataBound"
                                                                            EnableLinqExpressions="False" AllowSorting="true" PageSize="5">
                                                                            <PagerStyle AlwaysVisible="true" />
                                                                            <%--<ClientSettings>
                                                                                <Selecting AllowRowSelect="True" CellSelectionMode="None"  />
                                                                            </ClientSettings>--%>
                                                                            <ClientSettings>                                                                       
                                                                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                                            </ClientSettings>
                                                                            <MasterTableView CommandItemDisplay="Top">
                                                                                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                                                </RowIndicatorColumn>
                                                                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                                                </ExpandCollapseColumn>
                                                                                <Columns>
                                                                                    <%--    <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column" HeaderText="Select"
                                                                                        Visible="false" UniqueName="Select">
                                                                                    </telerik:GridClientSelectColumn>--%>
                                                                                    <telerik:GridTemplateColumn Visible="true">
                                                                                        <HeaderTemplate>
                                                                                            Request Id</HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportConfigurationId" runat="server" Text='<%# Bind("RequestId","R{0}") %>'></asp:Label></ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="FilePath" FilterControlAltText="Filter Name column"
                                                                                        DataField="FilePath" HeaderText="FilePath" HeaderTooltip="FilePath" SortExpression="FilePath">
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblPDFPath" runat="server" Text='<%# Bind("FilePath") %>' Visible="false"></asp:Label><asp:LinkButton
                                                                                                ID="lbtnfileName" runat="server" Text='<%# Bind("FilePath") %>' ></asp:LinkButton></ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="Name" FilterControlAltText="Filter Name column"
                                                                                        HeaderText="Report Name" HeaderTooltip="Report Name" DataField="Name" SortExpression="Name">
                                                                                        <HeaderTemplate>
                                                                                            Report Name
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportName" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                    <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date Created (US/Central Time)"
                                                                                        HeaderTooltip="Date Created (US/Central Time)" UniqueName="CreatedDate" DataFormatString="{0:dd MMM yyyy HH:mm:ss}"
                                                                                        SortExpression="CreatedDate" FilterControlAltText="Filter CreatedDate column">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridBoundColumn DataField="ExportStatus" HeaderText="File Status" HeaderTooltip="File Status"
                                                                                        UniqueName="ExportStatus" SortExpression="ExportStatus" FilterControlAltText="Filter StartDate column">
                                                                                    </telerik:GridBoundColumn>
                                                                                    <telerik:GridTemplateColumn UniqueName="ReportConfigurationId" DataField="ReportConfigurationId"
                                                                                        SortExpression="ReportConfigurationId" Visible="false">
                                                                                        <HeaderTemplate>
                                                                                            Report ID #
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblReportCustomId" runat="server" Text='<%# Bind("ReportConfigurationId","R{0}")  %>'></asp:Label>
                                                                                        </ItemTemplate>
                                                                                    </telerik:GridTemplateColumn>
                                                                                </Columns>
                                                                                <CommandItemTemplate>
                                                                                </CommandItemTemplate>
                                                                                <EditFormSettings>
                                                                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                                    </EditColumn>
                                                                                </EditFormSettings>
                                                                            </MasterTableView><FilterMenu EnableImageSprites="False">
                                                                            </FilterMenu>
                                                                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                                            </HeaderContextMenu>
                                                                        </telerik:RadGrid>
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
                                                </Items>                                                                                       
                                            </telerik:RadPanelBar>
                                        </asp:Panel>
                                        <div class="loading-indicator" id="divRptConfiguration" clientidmode="Static" style="display: none;"
                                            runat="server">
                                        </div>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
                                        <asp:AsyncPostBackTrigger ControlID="btnRefreshQueryGrid" />
                                        <asp:AsyncPostBackTrigger ControlID="btnRefreshRptGrid" />
                                        <asp:AsyncPostBackTrigger ControlID="btnRebind" />
                                    </Triggers>
                                </asp:UpdatePanel>
                                <asp:Button ID="btnExportPDF" runat="server" Visible="False" OnClick="btnExportPDF_Click" />
                                <asp:HiddenField ID="hndPdfpath" runat="server" ClientIDMode="Static" />
                                <asp:HiddenField ID="hndRepId" runat="server" ClientIDMode="Static" />
                            </ContentTemplate>
                        </asp:TabPanel>
                        <asp:TabPanel runat="server" HeaderText="Permissions" ID="TbPermissions" Visible="false">
                            <HeaderTemplate>
                                Permissions
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="UpdatePanelPermissionsList" runat="server" UpdateMode="Conditional">
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <div id="PermissionsListPanel" runat="server" clientidmode="Static">
                                            <Permissions:PermissionDetails ID="PermissionDetails" runat="server" />
                                            <Permissions:PermissionsList ID="PermissionsList" runat="server" />
                                        </div>
                                        <div class="loading-indicator" id="divAdminPermissionsListLoading" clientidmode="Static"
                                            style="display: none;" runat="server">
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </asp:TabPanel>
                        <asp:TabPanel runat="server" HeaderText="System Settings" ID="TbSystemSettings" Visible="false">
                            <HeaderTemplate>
                                System Settings
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="UpdatePanelSystemSettings" runat="server" UpdateMode="Conditional">
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <div id="divSystemSettings" runat="server" visible="false">
                                            <SystemSetting:SystemSettings ID="SystemSettng" runat="server" />
                                        </div>
                                        <div class="loading-indicator" id="divAdminSystemSettingsLoading" clientidmode="Static"
                                            style="display: none;" runat="server">
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </asp:TabPanel>
                        <%-- <asp:TabPanel runat="server" HeaderText="User Settings" ID="TbUserSettings">
                            <HeaderTemplate>
                                User Settings
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <div>
                                            <UserSettings:UserSettings ID="UserSettings" runat="server" />
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </asp:TabPanel>--%>
                    </asp:TabContainer>
                </td>
            </tr>
        </table>
        <div class="processingLoader" id="processingLoader" style="display: none;">
            <img src="../Images/ajax-clock.gif" alt="loading" />
            <p>
                Processing... Please wait
            </p>
        </div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Outlook">
            <Windows>
                <%-- ------------------------------------------------------------------------------------------------------------- --%>
                <%-- Three Step Wizard window --%>
                <telerik:RadWindow ID="ReportWizard" runat="server" Modal="true" NavigateUrl="~/Report/ThreeStepWizard.aspx"
                    Width="600px" Height="500px" Behaviors="Close, Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ClientIDMode="Static" Style="z-index: 10000;">
                </telerik:RadWindow>
                <%-- Contacts Lookup --%>
                <telerik:RadWindow ID="IndividualsLookup" runat="server" Modal="true" NavigateUrl="~/Report/ContactsLookup.aspx"
                    Height="400px" Width="500px" Behaviors="Close, Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ReloadOnShow="true" ClientIDMode="Static" Style="z-index: 11000;">
                </telerik:RadWindow>
                <%-- Companies Lookup --%>
                <telerik:RadWindow ID="CompaniesLookup" runat="server" Modal="true" NavigateUrl="~/Report/CompaniesLookup.aspx"
                    Height="400px" Width="500px" Behaviors="Close, Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ReloadOnShow="true" ClientIDMode="Static" Style="z-index: 11000;">
                </telerik:RadWindow>
                <%-- Divisions Lookup --%>
                <telerik:RadWindow ID="Divisionlookup" runat="server" Modal="true" NavigateUrl="~/Report/DivSubDivLookup.aspx"
                    Height="580px" Width="500px" Behaviors="Close, Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ReloadOnShow="true" ClientIDMode="Static" Style="z-index: 11000;">
                </telerik:RadWindow>
                <%-- Contries Lookup --%>
                <telerik:RadWindow ID="CountryLookup" runat="server" Modal="true" NavigateUrl="~/Report/CountryStateLookup.aspx"
                    Height="580px" Width="500px" Behaviors="Close, Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ReloadOnShow="true" ClientIDMode="Static" Style="z-index: 11000;">
                </telerik:RadWindow>
                <%-- Save Report Popup --%>
                <telerik:RadWindow ID="SaveReport" runat="server" Modal="true" NavigateUrl="~/Report/SaveReport.aspx"
                    Height="560px" Width="650px" Behaviors="Move" VisibleStatusbar="false" KeepInScreenBounds="true"
                    ReloadOnShow="true" ClientIDMode="Static" Style="z-index: 11000;">
                </telerik:RadWindow>
                <%-- ------------------------------------------------------------------------------------------------------------- --%>
                <telerik:RadWindow ID="ManageDivisions" runat="server" CssClass="ZindexALignment" KeepInScreenBounds="true"
                    Behaviors="Close" NavigateUrl="~/CalendarAdministrator/ManageDivision.aspx" Modal="true"
                    Height="300px" Width="500px" ShowContentDuringLoad="false" VisibleStatusbar="false"
                    ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ManageSubDivisions" runat="server" CssClass="ZindexALignment" KeepInScreenBounds="true"
                    Behaviors="Close" NavigateUrl="~/CalendarAdministrator/ManageSubDivision.aspx"
                    Modal="true" Height="350px" Width="340px" ShowContentDuringLoad="false" VisibleStatusbar="false"
                    ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="AssigneeList" runat="server" CssClass="ZindexALignment" Behaviors="Close" KeepInScreenBounds="true"
                    NavigateUrl="~/CalendarAdministrator/AssigneeList.aspx" Modal="true" Height="350px"
                    Width="450px" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ReviewerDivision" runat="server" CssClass="ZindexALignment" KeepInScreenBounds="true"
                    Behaviors="Close" NavigateUrl="~/CalendarAdministrator/ReviewerDivisions.aspx"
                    Modal="true" Height="350px" Width="450px" ShowContentDuringLoad="false" VisibleStatusbar="false"
                    ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="DashboardScreenSetup" runat="server" CssClass="ZindexALignment" KeepInScreenBounds="true"
                    OnClientClose="OnAdminDashBoardClose" Behaviors="Close" NavigateUrl="../DashboardScreenSetup.aspx"
                    Modal="true" Height="250px" Width="300px" ShowContentDuringLoad="false" VisibleStatusbar="false"
                    ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ReportConfigurator" runat="server" CssClass="ZindexALignment"
                    KeepInScreenBounds="true" OnClientClose="RefreshGrid" Height="550px" Width="1200px" 
                    Behaviors="Maximize,Move,Resize" NavigateUrl="~/Report/ReportConfig.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ReportStandardReport" runat="server" CssClass="ZindexALignment"
                    KeepInScreenBounds="true" OnClientClose="RefreshGrid" Height="550px" Width="1200px"
                    Behaviors="Maximize,Close,Move,Resize" NavigateUrl="~/Reporting/StandardReport.aspx"
                    Modal="true" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="StopWorkFlow" runat="server" CssClass="ZindexALignment" OnClientClose="RefreshGridForWorkFlow"
                    KeepInScreenBounds="true" Height="200px" Width="560px" Behaviors="Close,Move"
                    NavigateUrl="~/Reporting/StopWorkFlow.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true" >
                </telerik:RadWindow
                 <telerik:RadWindow ID="UpdateSchedule" runat="server"  Modal="true" Behaviors="Close" EnableEmbeddedScripts="false" OnClientClose="ReopenWinStopWorkflow"
                    KeepInScreenBounds="true" Height="230px" Width="400px" AutoSize="false"  NavigateUrl="~/Reporting/UpdateRecurringSchedule.aspx" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" VisibleTitlebar="true" ReloadOnShow="true">
                </telerik:RadWindow>        
                <telerik:RadWindow ID="openWinstandardrpt1" runat="server" CssClass="ZindexALignment"
                    KeepInScreenBounds="true" Height="200px" Width="350px" Behaviors="Close,Move" 
                    NavigateUrl="~/Reporting/Typeofstandardreport.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ReportStandardRptcriteria" runat="server" CssClass="ZindexALignment"
                    KeepInScreenBounds="true" Height="550px" Width="1200px" Behaviors="Maximize,Close,Move,Resize"
                    NavigateUrl="~/Reporting/StandardReport.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true" Style="z-index: 10000;">
                </telerik:RadWindow>
                <telerik:RadWindow ID="ReportSearch" runat="server" CssClass="ZindexALignment" OnClientClose="RefreshReportGrid"
                    KeepInScreenBounds="true" Height="500px" Width="720px" Behaviors="Move, Close"
                    NavigateUrl="SearchCriteriaForReports.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="QuerySearch" runat="server" CssClass="ZindexALignment" OnClientClose="RefreshQueryGrid"
                    KeepInScreenBounds="true" Height="500px" Width="720px" Behaviors="Move, Close"
                    NavigateUrl="SearchCriteriaForQuery.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="DelReportSearch" runat="server" CssClass="ZindexALignment" OnClientClose="RefreshDeletedReportGrid"
                    KeepInScreenBounds="true" Height="500px" Width="720px" Behaviors="Move, Close"
                    NavigateUrl="SearchCriteriaForDeletedReports.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
                <telerik:RadWindow ID="DelQuerySearch" runat="server" CssClass="ZindexALignment" OnClientClose="RefreshDeletedQueryGrid"
                    KeepInScreenBounds="true" Height="500px" Width="720px" Behaviors="Move, Close"
                    NavigateUrl="SearchCriteriaForDeletedQuery.aspx" Modal="true" ShowContentDuringLoad="false"
                    VisibleStatusbar="false" ReloadOnShow="true">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
        <script type="text/javascript">
            function DisplayAdminDashBoardSections() {
                var con = document.getElementById('hdnCalNotInitializedDiv').value;
     
                if (con == '1') {
                    //$('#CalNotInitializedDiv').show("slow", null);
                    $('#CalNotInitializedDiv').show();
                }
                else {
                    //$('#CalNotInitializedDiv').hide("slow", null);
                    $('#CalNotInitializedDiv').hide();
                }
     
                var news = document.getElementById('hdnLastPostedDiv').value;
                if (news == '1') {
                    //$('#LastPostedDiv').show("slow", null);
                    $('#LastPostedDiv').show();
                }
                else {
                    //$('#LastPostedDiv').hide("slow", null);
                    $('#LastPostedDiv').hide();
                }
     
                //            var web = document.getElementById('hdnSavedReportsDiv').value;
                //            if (web == '1') {
                //                $('#SavedReportsDiv').show("slow", null);
                //            }
                //            else {
                //                $('#SavedReportsDiv').hide("slow", null);
                //            }
            }
        </script>
        <script type="text/javascript">
            var editCreateAsyncCallbackCount = 0;
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(handleendequest);
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(handlebeginrequest);
            function handlebeginrequest(sender, args) {
                //        debugger
                editCreateAsyncCallbackCount = 0;
                var tabMode = sender._form.getElementsByTagName('input').tabMode.value;
                var asyncActionType = sender._form.getElementsByTagName('input').AsyncActionType.value;
                $("#processingLoader").hide("fast", null);
                $("#divAdminHomeLoading").show("fast", null);
                if (asyncActionType == 'tabswitch') {
                    $("#processingLoader").show("fast", null);
                    $("#pnlCalendarNotInitialize").hide("fast", null);
                    $("#pnlLastPostedDate30Days").hide("fast", null);
                    $("#pnlPermissionDetails").hide("fast", null);
                    $("#pnlPermissions").hide("fast", null);
                    $("#divAdminPermissionsListLoading").show("fast", null);
                    $("#pnlSystemSettings").hide("fast", null);
                    $("#divAdminSystemSettingsLoading").show("fast", null);
                    $("#pnlRptConfiguration").hide("fast", null);
                    $("#divRptConfiguration").show("fast", null);
                }
                if (asyncActionType == '') {
                    $('#pnlCalendarNotInitialize').attr('disabled', true);
                    $('#pnlLastPostedDate30Days').attr('disabled', true);
                    $("#pnlPermissionDetails").attr('disabled', true);
                    $("#pnlPermissions").attr('disabled', true);
                    $("#pnlSystemSettings").attr('disabled', true);
                    $("#pnlRptConfiguration").attr('disabled', true);
                    $("#processingLoader").show("slow", null);
                }
            }
            function handleendequest(sender, args) {
                //        debugger
                var tabMode = sender._form.getElementsByTagName('input').tabMode.value;
                var asyncActionType = sender._form.getElementsByTagName('input').AsyncActionType.value;
                if (editCreateAsyncCallbackCount == 1) {
                    if (args.get_error() == undefined) {
                        $("#pnlCalendarNotInitialize").show("fast", null);
                        $("#pnlLastPostedDate30Days").show("fast", null);
                        $("#divAdminHomeLoading").hide("fast", null);
                        if (asyncActionType == 'tabswitch') {
                            $("#pnlPermissionDetails").show("fast", null);
                            $("#pnlPermissions").show("fast", null);
                            $("#divAdminPermissionsListLoading").hide("fast", null);
                            $("#pnlSystemSettings").show("fast", null);
                            $("#divAdminSystemSettingsLoading").hide("fast", null);
                            $("#pnlRptConfiguration").show("fast", null);
                            $("#divRptConfiguration").hide("fast", null);
                            $("#AsyncActionType").attr("value", '');
                        }
     
                    }
                }
     
     
                if (asyncActionType == '') {
                    $('#pnlCalendarNotInitialize').attr('disabled', false);
                    $('#pnlLastPostedDate30Days').attr('disabled', false);
                    $("#pnlPermissionDetails").attr('disabled', false);
                    $("#pnlPermissions").attr('disabled', false);
                    $("#pnlSystemSettings").attr('disabled', false);
                    $("#pnlRptConfiguration").attr('disabled', false);
                    $("#processingLoader").hide("slow", null);
                }
            }
        </script>
        <script type="text/javascript">
            try {
                if (!isPostBack) {
                    PartialPost();
                }
            }
            catch (err) { }
     
         
        </script>
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="rightContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="leftContent" runat="server">
    </asp:Content>


    window 1
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportConfig.aspx.cs" Inherits="MYProject.MYProjectPortal.Web.Report.ReportConfig" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <%--<title> Report Configurator - Untitled Report</title>--%>
        <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
        <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
        <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />
        <telerik:RadCodeBlock ID="radcodeblock" runat="server">
            <script type="text/javascript">
                function openWinReportDashboard() {