private void cargarReporte() { RadComboBox cmb_periodo = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_periodo") as RadComboBox; RadComboBox cmb_año = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_año") as RadComboBox; RadComboBox cmb_mes = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_mes") as RadComboBox; RadComboBox cmb_cadena = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_cadena") as RadComboBox; RadComboBox cmb_ciudad = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_ciudad") as RadComboBox; RadComboBox cmb_cobertura = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_cobertura") as RadComboBox; Informes_validacion.UC_ValidarPeriodos UC_ValidarPeriodos1 = RadPanelBar_menu.FindChildByValue <RadPanelItem>("validar").FindControl("UC_ValidarPeriodos1") as Informes_validacion.UC_ValidarPeriodos; iidcompany = Convert.ToInt32(this.Session["companyid"].ToString()); sidcanal = this.Session["Canal"].ToString(); Report = Convert.ToInt32(this.Session["Reporte"]); iservicio = Convert.ToInt32(this.Session["Service"]); string sidperdil = this.Session["Perfilid"].ToString(); string id_categoria, año, mes, periodo; bool validacion; id_categoria = Request.QueryString["cod"]; año = cmb_año.SelectedValue; mes = cmb_mes.SelectedValue; periodo = cmb_periodo.SelectedValue; if (cmb_año.SelectedValue == "0" && cmb_mes.SelectedValue == "0") { P.Servicio = iservicio; P.Canal = sidcanal; P.Cliente = iidcompany; P.SetPeriodoInicial_Presencia(); año = P.Año; mes = P.Mes; periodo = P.PeriodoId; cmb_año.SelectedIndex = cmb_año.Items.FindItemIndexByValue(año); cmb_mes.SelectedIndex = cmb_mes.Items.FindItemIndexByValue(mes); cargarPeriodo(); cmb_periodo.SelectedIndex = cmb_periodo.Items.FindItemIndexByValue(periodo); } if (sidperdil == ConfigurationManager.AppSettings["PerfilAnalista"]) { RadPanelBar_menu.FindChildByValue <RadPanelItem>("itemValidacion").Visible = true; RadPanelBar_menu.FindChildByValue <RadPanelItem>("configuracion").Visible = true; UC_ValidarPeriodos1.SetValidacion(iservicio, sidcanal, iidcompany, Report, año, mes, periodo); validacion = false; } else { RadPanelBar_menu.FindChildByValue <RadPanelItem>("itemValidacion").Visible = false; RadPanelBar_menu.FindChildByValue <RadPanelItem>("configuracion").Visible = false; validacion = true; } Reporte.Visible = true; Reporte.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Reporte.ZoomMode = Microsoft.Reporting.WebForms.ZoomMode.Percent; Reporte.ServerReport.ReportPath = "/Reporte_Precios_V1/Reporte_IndexPriceDetail"; string strConnection = ConfigurationManager.AppSettings["SERVIDOR_REPORTING_SERVICES"]; Reporte.ServerReport.ReportServerUrl = new Uri(strConnection); Reporte.ServerReport.ReportServerCredentials = new CFG.Tools.ReportServerNetCredentials(); List <Microsoft.Reporting.WebForms.ReportParameter> parametros = new List <Microsoft.Reporting.WebForms.ReportParameter>(); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("AÑO", año)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("MES", mes)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("PERIODO", periodo)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CIUDAD", cmb_ciudad.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CADENA", cmb_cadena.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TIPOCIUDAD", cmb_cobertura.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CANAL", sidcanal)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CLIENTE", iidcompany.ToString())); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SERVICIO", iservicio.ToString())); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("VALIDANALYST", validacion.ToString())); Reporte.ServerReport.SetParameters(parametros); }
private void cargarReportSOD() { RadComboBox cmb_año = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_año") as RadComboBox; RadComboBox cmb_mes = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_mes") as RadComboBox; RadComboBox cmb_ciudad = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_ciudad") as RadComboBox; RadComboBox cmb_marca = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_marca") as RadComboBox; RadComboBox cmb_categoria = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_categoria") as RadComboBox; RadComboBox cmb_region = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("cmb_region") as RadComboBox; Informes_validacion.UC_ValidarPeriodos UC_ValidarPeriodos1 = RadPanelBar_menu.FindChildByValue <RadPanelItem>("validar").FindControl("UC_ValidarPeriodos1") as Informes_validacion.UC_ValidarPeriodos; iidcompany = Convert.ToInt32(this.Session["companyid"].ToString()); sidcanal = this.Session["Canal"].ToString(); Report = Convert.ToInt32(this.Session["Reporte"]); iservicio = Convert.ToInt32(this.Session["Service"]); string sidperdil = this.Session["Perfilid"].ToString(); string año, mes, periodo; string validacion; año = cmb_año.SelectedValue; mes = cmb_mes.SelectedValue; if (cmb_año.SelectedValue == "0" && cmb_mes.SelectedValue == "0") { P.Servicio = iservicio; P.Canal = sidcanal; P.Cliente = iidcompany; P.SetPeriodoInicial_SOD(); año = P.Año; mes = P.Mes; cmb_año.SelectedIndex = cmb_año.Items.FindItemIndexByValue(año); cmb_mes.SelectedIndex = cmb_mes.Items.FindItemIndexByValue(mes); } if (sidperdil == ConfigurationManager.AppSettings["PerfilAnalista"]) { RadPanelBar_menu.FindChildByValue <RadPanelItem>("itemValidacion").Visible = true; UC_ValidarPeriodos1.SetValidacion(iservicio, sidcanal, iidcompany, Report, año, mes, "1"); validacion = "0"; } else { RadPanelBar_menu.FindChildByValue <RadPanelItem>("itemValidacion").Visible = false; validacion = "1"; } Reporte_contenido.Visible = true; Reporte_contenido.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Reporte_contenido.ZoomMode = Microsoft.Reporting.WebForms.ZoomMode.Percent; Reporte_contenido.ServerReport.ReportPath = "/Reporte_Precios_V1/Evolucion_SOD_Mayorista"; String strConnection = ConfigurationManager.AppSettings["SERVIDOR_REPORTING_SERVICES"]; Reporte_contenido.ServerReport.ReportServerUrl = new Uri(strConnection); Reporte_contenido.ServerReport.ReportServerCredentials = new CFG.Tools.ReportServerNetCredentials(); List <Microsoft.Reporting.WebForms.ReportParameter> parametros = new List <Microsoft.Reporting.WebForms.ReportParameter>(); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("AÑO", cmb_año.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("MES", cmb_mes.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("OFICINA", "0")); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CATEGORIA", (cmb_categoria.SelectedValue == "0" ? "12" : cmb_categoria.SelectedValue))); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("MARCA", cmb_marca.SelectedValue)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("PDV", "0")); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CANAL", sidcanal)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CLIENTE", iidcompany.ToString())); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SERVICIO", iservicio.ToString())); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("ValidAnalyst", validacion)); parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("id_mallas", (cmb_region.SelectedValue == "0" ? "2" : cmb_region.SelectedValue))); Reporte_contenido.ServerReport.SetParameters(parametros); }