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