public void ReportView() { try { if (Session["DsDatos"] != null) { var dsDiseño = new dsCustomer(); var dsEjecucion = (DataSet)Session["DsDatos"]; for (var i = 0; i < dsEjecucion.Tables[0].Rows.Count; i++) { var row = dsDiseño.SWIFT_CUSTOMERS.NewRow(); row[0] = dsEjecucion.Tables[0].Rows[i]["CODE_CUSTOMER"]; row[1] = dsEjecucion.Tables[0].Rows[i]["NAME_CUSTOMER"]; row[2] = dsEjecucion.Tables[0].Rows[i]["NAME_CLASSIFICATION"]; row[3] = dsEjecucion.Tables[0].Rows[i]["CONTACT_CUSTOMER"]; row[4] = dsEjecucion.Tables[0].Rows[i]["NAME_ROUTE"]; dsDiseño.SWIFT_CUSTOMERS.Rows.Add(row); } Session["DsDatos"] = dsDiseño; var reporte = new Report.ReportCustomer { 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)) { try { var reporte = new Report.ReportCustomer { DataSource = Session["DSDISEÑO"] }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); _user = Session["USER"].ToString(); Connection = Session["connectionString"].ToString(); GetCustomer(); GetClassification(); GetRoute(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } } }