Esempio n. 1
0
 protected void ResetButton_Click(object sender, EventArgs e)
 {
     ServerListBox.UnselectAll();
     DashboardReports.ExchangeUserCountXtraRpt report = new DashboardReports.ExchangeUserCountXtraRpt();
     report.Parameters["ServerName"].Value = "";
     ASPxDocumentViewer1.Report            = report;
     ASPxDocumentViewer1.DataBind();
 }
Esempio n. 2
0
        private void Report()
        {
            string selectedStatType = "";
            string selectedUserType = "";
            string selectedServer   = "";

            if (UserTypeComboBox.SelectedIndex != -1)
            {
                selectedUserType = UserTypeComboBox.SelectedItem.Value.ToString();
            }
            if (RptTypeRadioButtonList.SelectedIndex != -1)
            {
                selectedStatType = RptTypeRadioButtonList.SelectedItem.Value.ToString();
            }
            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 = "";     // throw ex;
                }
                finally { }
            }
            DashboardReports.ExchangeUserCountXtraRpt report = new DashboardReports.ExchangeUserCountXtraRpt();
            report.Parameters["ServerName"].Value = selectedServer;
            report.Parameters["StatType"].Value   = selectedStatType;
            report.Parameters["UserType"].Value   = selectedUserType;
            report.Parameters["StartDate"].Value  = dtPick.FromDate; // StartDateEdit.Text;
            report.Parameters["EndDate"].Value    = dtPick.ToDate;
            report.CreateDocument();
            ASPxDocumentViewer1.Report = report;
            ASPxDocumentViewer1.DataBind();
        }