示例#1
0
        protected void gsContadorSinAccesos_PreRender(object sender, EventArgs e)
        {
            PivotGridAggregateField field1 = gsContadorSinAccesos.Fields.Where(x => x.DataField == "idMenu").FirstOrDefault() as PivotGridAggregateField;

            field1.CellStyle.Font.Bold = true;
            field1.CellStyle.BackColor = Color.FromArgb(255, 255, 213);
        }
        protected void grdVendedor_PreRender(object sender, EventArgs e)
        {
            PivotGridAggregateField field1 = grdVendedor.Fields.Where(x => x.DataField == "Id_Zona").FirstOrDefault() as PivotGridAggregateField;

            field1.CellStyle.Font.Bold = true;
            field1.CellStyle.BackColor = Color.FromArgb(255, 255, 213);
        }
        protected void gsReporteVentas_Item_PreRender(object sender, EventArgs e)
        {
            //provide custom CSS class for the TotalPrice aggregate field and column headers
            PivotGridAggregateField field1 = gsReporteVentas_Item.Fields.Where(x => x.DataField == "Cantidad").FirstOrDefault() as PivotGridAggregateField;

            field1.CellStyle.Font.Bold = true;
            field1.CellStyle.BackColor = Color.Khaki;


            //provide custom CSS class for the Quantity aggregate field and column headers
            PivotGridAggregateField CantidadPPTO = gsReporteVentas_Item.Fields.Where(x => x.DataField == "CantidadPPTO").FirstOrDefault() as PivotGridAggregateField;

            CantidadPPTO.CellStyle.Font.Bold = true;
            CantidadPPTO.CellStyle.BackColor = Color.SandyBrown;

            PivotGridAggregateField SaldoDolares = gsReporteVentas_Item.Fields.Where(x => x.DataField == "SaldoDolares").FirstOrDefault() as PivotGridAggregateField;

            SaldoDolares.CellStyle.Font.Bold = true;
            SaldoDolares.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField VentaPPTO_Dolares = gsReporteVentas_Item.Fields.Where(x => x.DataField == "VentaPPTO_Dolares").FirstOrDefault() as PivotGridAggregateField;

            VentaPPTO_Dolares.CellStyle.Font.Bold = true;
            VentaPPTO_Dolares.CellStyle.BackColor = Color.SandyBrown;

            PivotGridAggregateField CostoDolares = gsReporteVentas_Item.Fields.Where(x => x.DataField == "CostoDolares").FirstOrDefault() as PivotGridAggregateField;

            CostoDolares.CellStyle.Font.Bold = true;
            CostoDolares.CellStyle.BackColor = Color.Khaki;


            PivotGridAggregateField UtilidadDolares = gsReporteVentas_Item.Fields.Where(x => x.DataField == "UtilidadDolares").FirstOrDefault() as PivotGridAggregateField;

            UtilidadDolares.CellStyle.Font.Bold = true;
            UtilidadDolares.CellStyle.BackColor = Color.Gold;



            PivotGridAggregateField PUnitario_c = gsReporteVentas_Item.Fields.Where(x => x.DataField == "PUnitario_c").FirstOrDefault() as PivotGridAggregateField;

            PUnitario_c.CellStyle.Font.Bold = true;
            PUnitario_c.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField PUnitarioPPT_c = gsReporteVentas_Item.Fields.Where(x => x.DataField == "PUnitarioPPT_c").FirstOrDefault() as PivotGridAggregateField;

            PUnitarioPPT_c.CellStyle.Font.Bold = true;
            PUnitarioPPT_c.CellStyle.BackColor = Color.SandyBrown;

            PivotGridAggregateField PUnitarioAnterior_c = gsReporteVentas_Item.Fields.Where(x => x.DataField == "PUnitarioAnterior_c").FirstOrDefault() as PivotGridAggregateField;

            PUnitarioAnterior_c.CellStyle.Font.Bold = true;
            PUnitarioAnterior_c.CellStyle.BackColor = Color.SkyBlue;

            //-----------------------------------------------------------

            PivotGridAggregateField CostoUnitario = gsReporteVentas_Item.Fields.Where(x => x.DataField == "CUnitario_c").FirstOrDefault() as PivotGridAggregateField;

            CostoUnitario.CellStyle.Font.Bold = true;
            CostoUnitario.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField CostoUnitarioAnterior = gsReporteVentas_Item.Fields.Where(x => x.DataField == "CUnitarioAnterior_c").FirstOrDefault() as PivotGridAggregateField;

            CostoUnitarioAnterior.CellStyle.Font.Bold = true;
            CostoUnitarioAnterior.CellStyle.BackColor = Color.SkyBlue;


            //-------------------------------------------------------------
            PivotGridAggregateField Margen = gsReporteVentas_Item.Fields.Where(x => x.DataField == "Margen_2017_c").FirstOrDefault() as PivotGridAggregateField;

            Margen.CellStyle.Font.Bold = true;
            Margen.CellStyle.BackColor = Color.SandyBrown;

            PivotGridAggregateField Margen2016 = gsReporteVentas_Item.Fields.Where(x => x.DataField == "Margen_2016_c").FirstOrDefault() as PivotGridAggregateField;

            Margen2016.CellStyle.Font.Bold = true;
            Margen2016.CellStyle.BackColor = Color.SkyBlue;

            //-------------------------------------------------------------
            PivotGridAggregateField VPU2017x2016 = gsReporteVentas_Item.Fields.Where(x => x.DataField == "VPU_2016_c").FirstOrDefault() as PivotGridAggregateField;

            VPU2017x2016.CellStyle.Font.Bold = true;
            VPU2017x2016.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField VPU2017xPPTO = gsReporteVentas_Item.Fields.Where(x => x.DataField == "VPU_PPTO_c").FirstOrDefault() as PivotGridAggregateField;

            VPU2017xPPTO.CellStyle.Font.Bold = true;
            VPU2017xPPTO.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField VMg17_16 = gsReporteVentas_Item.Fields.Where(x => x.DataField == "VMg17_16_c").FirstOrDefault() as PivotGridAggregateField;

            VMg17_16.CellStyle.Font.Bold = true;
            VMg17_16.CellStyle.BackColor = Color.DarkOrange;
        }
示例#4
0
        protected void gsReporteVentas_Familia_PreRender(object sender, EventArgs e)
        {
            //provide custom CSS class for the TotalPrice aggregate field and column headers
            PivotGridAggregateField ImporteMes = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "ImporteMes").FirstOrDefault() as PivotGridAggregateField;

            ImporteMes.CellStyle.Font.Bold = true;
            ImporteMes.CellStyle.BackColor = Color.Khaki;


            //provide custom CSS class for the Quantity aggregate field and column headers
            PivotGridAggregateField field2 = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeMes").FirstOrDefault() as PivotGridAggregateField;

            field2.CellStyle.Font.Bold = true;
            field2.CellStyle.BackColor = Color.LightGreen;


            //PivotGridAggregateField SaldoDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "Margen").FirstOrDefault() as PivotGridAggregateField;
            //SaldoDolares.CellStyle.Font.Bold = true;
            //SaldoDolares.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField PRONOSTICADO_Dolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeMargen").FirstOrDefault() as PivotGridAggregateField;
            //PRONOSTICADO_Dolares.CellStyle.Font.Bold = true;
            //PRONOSTICADO_Dolares.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField CostoDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "GastoVentaDolares").FirstOrDefault() as PivotGridAggregateField;
            //CostoDolares.CellStyle.Font.Bold = true;
            //CostoDolares.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField UtilidadDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeGV").FirstOrDefault() as PivotGridAggregateField;
            //UtilidadDolares.CellStyle.Font.Bold = true;
            //UtilidadDolares.CellStyle.BackColor = Color.Khaki;



            //PivotGridAggregateField PrecioUnitario = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "UtilidadGV").FirstOrDefault() as PivotGridAggregateField;
            //PrecioUnitario.CellStyle.Font.Bold = true;
            //PrecioUnitario.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField PrecioUnitarioPres = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeUtilidadGV").FirstOrDefault() as PivotGridAggregateField;
            //PrecioUnitarioPres.CellStyle.Font.Bold = true;
            //PrecioUnitarioPres.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField PrecioUnitarioAnterior = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "GastoAdminDolares").FirstOrDefault() as PivotGridAggregateField;
            //PrecioUnitarioAnterior.CellStyle.Font.Bold = true;
            //PrecioUnitarioAnterior.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField CostoUnitario = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeGA").FirstOrDefault() as PivotGridAggregateField;
            //CostoUnitario.CellStyle.Font.Bold = true;
            //CostoUnitario.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField CostoUnitarioAnterior = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "UtilidadGA").FirstOrDefault() as PivotGridAggregateField;
            //CostoUnitarioAnterior.CellStyle.Font.Bold = true;
            //CostoUnitarioAnterior.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField Margen = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeUtilidadGA").FirstOrDefault() as PivotGridAggregateField;
            //Margen.CellStyle.Font.Bold = true;
            //Margen.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField Margen2016 = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "GastoFinanDolares").FirstOrDefault() as PivotGridAggregateField;
            //Margen2016.CellStyle.Font.Bold = true;
            //Margen2016.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField VPU2017x2016 = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeGF").FirstOrDefault() as PivotGridAggregateField;
            //VPU2017x2016.CellStyle.Font.Bold = true;
            //VPU2017x2016.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField VPU2017xPPTO = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "UtilidadGF").FirstOrDefault() as PivotGridAggregateField;
            //VPU2017xPPTO.CellStyle.Font.Bold = true;
            //VPU2017xPPTO.CellStyle.BackColor = Color.Khaki;



            //PivotGridAggregateField Participacion = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "Participacion").FirstOrDefault() as PivotGridAggregateField;
            //Participacion.CellStyle.Font.Bold = true;
            //Participacion.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField IMPUESTO = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "IMPUESTO").FirstOrDefault() as PivotGridAggregateField;
            //IMPUESTO.CellStyle.Font.Bold = true;
            //IMPUESTO.CellStyle.BackColor = Color.Khaki;


            //PivotGridAggregateField UtilidadNeta = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "UtilidadNeta").FirstOrDefault() as PivotGridAggregateField;
            //UtilidadNeta.CellStyle.Font.Bold = true;
            //UtilidadNeta.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField PorcentajeUtilidadNeta = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PorcentajeUtilidadNeta").FirstOrDefault() as PivotGridAggregateField;
            //PorcentajeUtilidadNeta.CellStyle.Font.Bold = true;
            //PorcentajeUtilidadNeta.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField GastoVentaD = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "GastoVentaD").FirstOrDefault() as PivotGridAggregateField;
            //GastoVentaD.CellStyle.Font.Bold = true;
            //GastoVentaD.CellStyle.BackColor = Color.Khaki;

            //PivotGridAggregateField GastoVentaI = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "GastoVentaI").FirstOrDefault() as PivotGridAggregateField;
            //GastoVentaI.CellStyle.Font.Bold = true;
            //GastoVentaI.CellStyle.BackColor = Color.Khaki;
        }
        protected void gsReporteVentas_Zonas_PreRender(object sender, EventArgs e)
        {
            //provide custom CSS class for the TotalPrice aggregate field and column headers
            PivotGridAggregateField SaldoDolares = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "SaldoDolares").FirstOrDefault() as PivotGridAggregateField;

            SaldoDolares.CellStyle.Font.Bold = true;
            SaldoDolares.CellStyle.BackColor = Color.Orange;
            //field1.CellStyle.CssClass = "aggregateCustom1";
            //field1.RenderingControl.CssClass = "aggregateCustom1";

            //provide custom CSS class for the Quantity aggregate field and column headers
            PivotGridAggregateField CostoDolares = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "CostoDolares").FirstOrDefault() as PivotGridAggregateField;

            CostoDolares.CellStyle.Font.Bold = true;
            CostoDolares.CellStyle.BackColor = Color.Orange;
            //field2.CellStyle.CssClass = "aggregateCustom2";
            //field2.RenderingControl.CssClass = "aggregateCustom2";

            PivotGridAggregateField Margen = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "Margen").FirstOrDefault() as PivotGridAggregateField;

            Margen.CellStyle.Font.Bold = true;
            Margen.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField MargenP = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "MargenPorcentaje").FirstOrDefault() as PivotGridAggregateField;

            MargenP.CellStyle.Font.Bold = true;
            MargenP.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField GastoVentaDirecto = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoVentaDirecto").FirstOrDefault() as PivotGridAggregateField;

            GastoVentaDirecto.CellStyle.Font.Bold = true;
            GastoVentaDirecto.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField GastoVentaIndirecto = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoVentaIndirecto").FirstOrDefault() as PivotGridAggregateField;

            GastoVentaIndirecto.CellStyle.Font.Bold = true;
            GastoVentaIndirecto.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField GastoVentaDolares = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoVentaDolares").FirstOrDefault() as PivotGridAggregateField;

            GastoVentaDolares.CellStyle.Font.Bold = true;
            GastoVentaDolares.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField MargenGD = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "MargenGASTOD").FirstOrDefault() as PivotGridAggregateField;

            MargenGD.CellStyle.Font.Bold = true;
            MargenGD.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField MargenGI = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "MargenGASTOI").FirstOrDefault() as PivotGridAggregateField;

            MargenGI.CellStyle.Font.Bold = true;
            MargenGI.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField MargenG = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "MargenGASTO").FirstOrDefault() as PivotGridAggregateField;

            MargenG.CellStyle.Font.Bold = true;
            MargenG.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField UtilidadOperativa = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadOperativa").FirstOrDefault() as PivotGridAggregateField;

            UtilidadOperativa.CellStyle.Font.Bold = true;
            UtilidadOperativa.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField UtilidadOperativaP = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadOperativaP").FirstOrDefault() as PivotGridAggregateField;

            UtilidadOperativaP.CellStyle.Font.Bold = true;
            UtilidadOperativaP.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField GastoAdministrativoD = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoAdministrativoD").FirstOrDefault() as PivotGridAggregateField;

            GastoAdministrativoD.CellStyle.Font.Bold = true;
            GastoAdministrativoD.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField GastoAdministrativoD_P = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoAdministrativoD_P").FirstOrDefault() as PivotGridAggregateField;

            GastoAdministrativoD_P.CellStyle.Font.Bold = true;
            GastoAdministrativoD_P.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField CostoUnitarioAnterior = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadGA").FirstOrDefault() as PivotGridAggregateField;

            CostoUnitarioAnterior.CellStyle.Font.Bold = true;
            CostoUnitarioAnterior.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField UtilidadGAP = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadGAP").FirstOrDefault() as PivotGridAggregateField;

            UtilidadGAP.CellStyle.Font.Bold = true;
            UtilidadGAP.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField Margen2016 = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoFinanDolares").FirstOrDefault() as PivotGridAggregateField;

            Margen2016.CellStyle.Font.Bold = true;
            Margen2016.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField GastoFinanDolares_P = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoFinanDolares_P").FirstOrDefault() as PivotGridAggregateField;

            GastoFinanDolares_P.CellStyle.Font.Bold = true;
            GastoFinanDolares_P.CellStyle.BackColor = Color.Orange;

            PivotGridAggregateField UtilidadGF = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadGF").FirstOrDefault() as PivotGridAggregateField;

            UtilidadGF.CellStyle.Font.Bold = true;
            UtilidadGF.CellStyle.BackColor = Color.Khaki;


            PivotGridAggregateField Participacion = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "Participacion").FirstOrDefault() as PivotGridAggregateField;

            Participacion.CellStyle.Font.Bold = true;
            Participacion.CellStyle.BackColor = Color.Khaki;


            PivotGridAggregateField Impuestos = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "Impuestos").FirstOrDefault() as PivotGridAggregateField;

            Impuestos.CellStyle.Font.Bold = true;
            Impuestos.CellStyle.BackColor = Color.Khaki;


            PivotGridAggregateField UtilidadNeta = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadNeta").FirstOrDefault() as PivotGridAggregateField;

            UtilidadNeta.CellStyle.Font.Bold = true;
            UtilidadNeta.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField UtilidadNeta_P = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "UtilidadNeta_P").FirstOrDefault() as PivotGridAggregateField;

            UtilidadNeta_P.CellStyle.Font.Bold = true;
            UtilidadNeta_P.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField GastoOtrosDolares = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoOtrosDolares").FirstOrDefault() as PivotGridAggregateField;

            GastoOtrosDolares.CellStyle.Font.Bold = true;
            GastoOtrosDolares.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField GastoOtrosDolares_P = gsReporteVentas_Zonas.Fields.Where(x => x.DataField == "GastoOtrosDolares_P").FirstOrDefault() as PivotGridAggregateField;

            GastoOtrosDolares_P.CellStyle.Font.Bold = true;
            GastoOtrosDolares_P.CellStyle.BackColor = Color.Khaki;
        }
        protected void gsReporteVentas_Familia_PreRender(object sender, EventArgs e)
        {
            PivotGridAggregateField field1 = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "KgLt").FirstOrDefault() as PivotGridAggregateField;

            field1.CellStyle.Font.Bold = true;
            field1.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField KgLtPPTO = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "KgLtPPTO").FirstOrDefault() as PivotGridAggregateField;

            KgLtPPTO.CellStyle.Font.Bold = true;
            KgLtPPTO.CellStyle.BackColor = Color.LightGreen;

            PivotGridAggregateField SaldoDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "SaldoDolares").FirstOrDefault() as PivotGridAggregateField;

            SaldoDolares.CellStyle.Font.Bold = true;
            SaldoDolares.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField VentaPPTO_Dolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "VentaPPTO_Dolares").FirstOrDefault() as PivotGridAggregateField;

            VentaPPTO_Dolares.CellStyle.Font.Bold = true;
            VentaPPTO_Dolares.CellStyle.BackColor = Color.LightGreen;


            PivotGridAggregateField CostoDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "CostoDolares").FirstOrDefault() as PivotGridAggregateField;

            CostoDolares.CellStyle.Font.Bold = true;
            CostoDolares.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField CostoPPTO_Dolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "CostoPPTO_Dolares").FirstOrDefault() as PivotGridAggregateField;

            CostoPPTO_Dolares.CellStyle.Font.Bold = true;
            CostoPPTO_Dolares.CellStyle.BackColor = Color.LightGreen;


            PivotGridAggregateField UtilidadDolares = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "UtilidadDolares").FirstOrDefault() as PivotGridAggregateField;

            UtilidadDolares.CellStyle.Font.Bold = true;
            UtilidadDolares.CellStyle.BackColor = Color.Orange;


            PivotGridAggregateField PUnitario = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PUnitario_c").FirstOrDefault() as PivotGridAggregateField;

            PUnitario.CellStyle.Font.Bold = true;
            PUnitario.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField PUnitarioPPT = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "PUnitarioPPT_c").FirstOrDefault() as PivotGridAggregateField;

            PUnitarioPPT.CellStyle.Font.Bold = true;
            PUnitarioPPT.CellStyle.BackColor = Color.LightGreen;

            PivotGridAggregateField CUnitario = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "CUnitario_c").FirstOrDefault() as PivotGridAggregateField;

            CUnitario.CellStyle.Font.Bold = true;
            CUnitario.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField CUnitarioPPTO_c = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "CUnitarioPPTO_c").FirstOrDefault() as PivotGridAggregateField;

            CUnitarioPPTO_c.CellStyle.Font.Bold = true;
            CUnitarioPPTO_c.CellStyle.BackColor = Color.LightGreen;


            PivotGridAggregateField Margen_c = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "Margen_cal").FirstOrDefault() as PivotGridAggregateField;

            Margen_c.CellStyle.Font.Bold = true;
            Margen_c.CellStyle.BackColor = Color.Khaki;

            PivotGridAggregateField Margen_PPTO_c = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "Margen_PPTO_cal").FirstOrDefault() as PivotGridAggregateField;

            Margen_PPTO_c.CellStyle.Font.Bold = true;
            Margen_PPTO_c.CellStyle.BackColor = Color.LightGreen;

            PivotGridAggregateField Variacion_P_c = gsReporteVentas_Familia.Fields.Where(x => x.DataField == "Variacion_P_c").FirstOrDefault() as PivotGridAggregateField;

            Variacion_P_c.CellStyle.Font.Bold = true;
            Variacion_P_c.CellStyle.BackColor = Color.Orange;
        }