protected void Page_Load(object sender, EventArgs e) { if (Session["Centro_Seleccionado"] != null) { centro_seleccionado = Convert.ToInt32(Session["Centro_Seleccionado"]); } if (Session["Codigo_Select"] != null) { codigo_seleccionado = Convert.ToInt32(Session["Codigo_Select"]); } WSGestion.WSGestion wsgest = new WSGestion.WSGestion(); wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs"); if (!IsPostBack) { DataTable dt = wsgest.REP_Detalle_Entrada_Inventario(centro_seleccionado, centro_seleccionado); ReportViewer1.ProcessingMode = ProcessingMode.Local; LocalReport localReport = ReportViewer1.LocalReport; localReport.ReportPath = "ReportesWebs/RPT_Entrada_Inventario.rdlc"; ReportDataSource ds = new ReportDataSource(); ds.Name = "DS_Reporte_Entrada_Inventario"; // nombre del asistente para informes ds.Value = dt; ReportViewer1.LocalReport.DataSources.Clear(); localReport.DataSources.Add(ds); } }
public void SetSubDataSource(object sender, SubreportProcessingEventArgs e) { WSGestion.WSGestion wsgest = new WSGestion.WSGestion(); wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs"); DataTable dt = wsgest.REP_Detalle_Entrada_Inventario(codigo_seleccionado, centro_seleccionado); ReportDataSource ds = new ReportDataSource(); ds.Name = "DS_RPT_DETALLE_ENTRADA_INVENTARIO"; ds.Value = dt; e.DataSources.Add(ds); }