public void ReportView() { try { if (Session["DsDatos"] != null) { var dsDiseño = new dsDriver(); var dsEjecucion = (DataSet)Session["DsDatos"]; for (int i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) { var row = dsDiseño.SWIFT_DRIVERS.NewRow(); row[0] = dsEjecucion.Tables[0].Rows[i]["CODE_DRIVER"]; row[1] = dsEjecucion.Tables[0].Rows[i]["NAME_DRIVER"]; row[2] = dsEjecucion.Tables[0].Rows[i]["VALUE_TEXT_CLASSIFICATION"]; row[3] = dsEjecucion.Tables[0].Rows[i]["LICENSE_DRIVER"]; row[4] = dsEjecucion.Tables[0].Rows[i]["PHONE_DRIVER"]; dsDiseño.SWIFT_DRIVERS.Rows.Add(row); } Session["DsDatos"] = dsDiseño; var reporte = new Report.ReportDriver { DataSource = dsDiseño }; Session["DSDISEÑO"] = dsDiseño; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
protected void Page_Load(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var reporte = new Report.ReportDriver(); reporte.DataSource = Session["DSDISEÑO"]; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); Connection = Session["connectionString"].ToString(); _user = Session["USER"].ToString(); GetClassification(); GetDriver(); } }