public void FillReport() { string selectedServer = ""; if (this.ServerListFilterListBox.SelectedItems.Count > 0) { selectedServer = ""; for (int i = 0; i < this.ServerListFilterListBox.SelectedItems.Count; i++) { selectedServer += "'" + this.ServerListFilterListBox.SelectedItems[i].Text + "'" + ","; } try { selectedServer = selectedServer.Substring(0, selectedServer.Length - 1); } catch { selectedServer = ""; // throw ex; } finally { } } DashboardReports.DailyMailVolumeXtraRpt report = new DashboardReports.DailyMailVolumeXtraRpt(); report.Parameters["ServerName"].Value = selectedServer; //12/18/2015 NS added for VSPLUS-2291 report.Parameters["RptType"].Value = DailyMonthlyRadioButtonList.SelectedItem.Value.ToString(); //26/4/2016 Durga Modified for VSPLUS-2883 report.Parameters["ServerType"].Value = TypeComboBox.Text; report.CreateDocument(); ASPxDocumentViewer1.Report = report; ASPxDocumentViewer1.DataBind(); }
public void ReportView() { try { if (Session["DS_USER"] != null) { var dsDiseño = new dsUsers(); var dsEjecucion = (DataSet)Session["DS_USER"]; for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) { var row = dsDiseño.USERS.NewRow(); row[0] = dsEjecucion.Tables[0].Rows[i]["CORRELATIVE"]; row[1] = dsEjecucion.Tables[0].Rows[i]["LOGIN"]; row[2] = dsEjecucion.Tables[0].Rows[i]["NAME_USER"]; row[3] = dsEjecucion.Tables[0].Rows[i]["TYPE_USER"]; dsDiseño.USERS.Rows.Add(row); } Session["DS_USER_DISEÑO"] = dsDiseño; var reporte = new ReportUser { DataSource = Session["DS_USER_DISEÑO"] }; ASPxDocumentViewer1.DataBind(); ASPxDocumentViewer1.Report = reporte; } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
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(); }
protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (!Page.IsPostBack) { try { Session["DATA_RECEPTION"] = null; ASPxDateEdit1.Date = DateTime.Now; ASPxDateEdit2.Date = DateTime.Now; //Carga en el GridView var pResult = ""; var ds = _objIncome.GetAllIncome(Session["connectionString"].ToString(), Convert.ToDateTime(ASPxDateEdit2.Date), Convert.ToDateTime(ASPxDateEdit1.Date), ref pResult); if (pResult == "") { if (ds.Tables[0].Rows.Count > 0) { ASPxGridView1.DataSource = ds; ASPxGridView1.DataBind(); Session["DATA_RECEPTION"] = ds; } } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } } try { if (Session["DSDISEÑO_RECEPTION"] != null) { var reporte = new Report.ReportListReception { DataSource = Session["DSDISEÑO_RECEPTION"] }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } if (Session["DATA_RECEPTION"] != null) { ASPxGridView1.DataSource = Session["DATA_RECEPTION"]; ASPxGridView1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
protected void ServerListResetButton_Click(object sender, EventArgs e) { //this.ServerListFilterComboBox.SelectedIndex = -1; this.ServerListFilterListBox.UnselectAll(); DashboardReports.DailyMailVolumeXtraRpt report = new DashboardReports.DailyMailVolumeXtraRpt(); report.Parameters["ServerName"].Value = ""; report.CreateDocument(); ASPxDocumentViewer1.Report = report; ASPxDocumentViewer1.DataBind(); }