Example #1
0
 protected void ResetButton_Click(object sender, EventArgs e)
 {
     //this.ServerListFilterComboBox.SelectedIndex = -1;
     this.ServerFilterTextBox.Text = "";
     this.NumberDaysTextBox.Text   = "";
     this.ServerListFilterListBox.UnselectAll();
     //2/2/2015 NS added for VSPLUS-1370
     this.ServerTypeFilterListBox.UnselectAll();
     fillcombo("");
     DashboardReports.DominoDiskAvgXtraRpt report = new DashboardReports.DominoDiskAvgXtraRpt();
     report.Parameters["ServerName"].Value    = "";
     report.Parameters["ServerNameSQL"].Value = "";
     report.Parameters["DaysRem"].Value       = "";
     report.Parameters["ServerType"].Value    = "";
     report.Parameters["ServerTypeSQL"].Value = "";
     report.CreateDocument();
     ASPxDocumentViewer1.Report = report;
     ASPxDocumentViewer1.DataBind();
 }
Example #2
0
        public void Report()
        {
            int    daysrem        = -1;
            string selectedServer = "";

            exactmatch = false;

            /*
             * if (this.ServerListFilterComboBox.SelectedIndex >= 0)
             * {
             *  selectedServer = this.ServerListFilterComboBox.SelectedItem.Value.ToString();
             * } */
            if (this.ServerFilterTextBox.Text != "")
            {
                selectedServer = this.ServerFilterTextBox.Text;
            }
            if (this.ServerListFilterListBox.SelectedItems.Count > 0)
            {
                selectedServer = "";
                for (int i = 0; i < this.ServerListFilterListBox.SelectedItems.Count; i++)
                {
                    selectedServer += "'" + this.ServerListFilterListBox.SelectedItems[i].Text + "'" + ",";
                }
                exactmatch = true;
                try
                {
                    selectedServer = selectedServer.Substring(0, selectedServer.Length - 1);
                }
                catch
                {
                    selectedServer = "";     // throw ex;
                    exactmatch     = false;
                }
                finally { }
            }
            //2/2/2015 NS added for VSPLUS-1370
            if (this.ServerTypeFilterListBox.SelectedItems.Count > 0)
            {
                selectedType    = "";
                selectedTypeSQL = "";
                for (int i = 0; i < this.ServerTypeFilterListBox.SelectedItems.Count; i++)
                {
                    selectedType    += this.ServerTypeFilterListBox.SelectedItems[i].Text + ",";
                    selectedTypeSQL += "'" + this.ServerTypeFilterListBox.SelectedItems[i].Text + "'" + ",";
                }
                try
                {
                    selectedType    = selectedType.Substring(0, selectedType.Length - 1);
                    selectedTypeSQL = selectedTypeSQL.Substring(0, selectedTypeSQL.Length - 1);
                }
                catch
                {
                    selectedType    = "";  // throw ex;
                    selectedTypeSQL = "";
                }
                finally { }
            }
            if (this.NumberDaysTextBox.Text.ToString() != "")
            {
                daysrem = Convert.ToInt32(this.NumberDaysTextBox.Value.ToString());
            }
            DashboardReports.DominoDiskAvgXtraRpt report = new DashboardReports.DominoDiskAvgXtraRpt();
            report.Parameters["ServerName"].Value    = selectedServer;
            report.Parameters["ServerNameSQL"].Value = selectedServer;
            report.Parameters["DaysRem"].Value       = daysrem;
            report.Parameters["ExactMatch"].Value    = exactmatch;
            //2/2/2015 NS added for VSPLUS-1370
            report.Parameters["ServerType"].Value    = selectedType;
            report.Parameters["ServerTypeSQL"].Value = selectedTypeSQL;
            report.CreateDocument();
            ASPxDocumentViewer1.Report = report;
            ASPxDocumentViewer1.DataBind();
        }