예제 #1
0
        public void FillReport()
        {
            DashboardReports.TravelerHTTPsessionsRpt rpt = new DashboardReports.TravelerHTTPsessionsRpt();
            string selectedServer = "";

            if (this.ServerListBox.SelectedItems.Count > 0)
            {
                selectedServer = "";
                for (int i = 0; i < this.ServerListBox.SelectedItems.Count; i++)
                {
                    selectedServer += "'" + this.ServerListBox.SelectedItems[i].Text + "'" + ",";
                }
                try
                {
                    selectedServer = selectedServer.Substring(0, selectedServer.Length - 1);
                }
                catch
                {
                    selectedServer = "";
                }
                finally { }
            }
            rpt.Parameters["ServerName"].Value = selectedServer;

            rpt.Parameters["StartDate"].Value = dtPick.FromDate;
            rpt.Parameters["EndDate"].Value   = dtPick.ToDate;

            rpt.Parameters["Threshold"].Value  = TCutoffTextBox.Text;
            rpt.Parameters["ServerType"].Value = srvtype;
            ReportViewer1.Report = rpt;
            ReportViewer1.DataBind();
        }
예제 #2
0
        protected void ResetButton_Click(object sender, EventArgs e)
        {
            this.ServerListBox.UnselectAll();
            DashboardReports.TravelerHTTPsessionsRpt rpt = new DashboardReports.TravelerHTTPsessionsRpt();

            rpt.Parameters["ServerName"].Value = "";

            rpt.Parameters["Threshold"].Value = "";
            TCutoffTextBox.Text = "";

            this.ReportViewer1.Report = rpt;
            this.ReportViewer1.DataBind();
        }