<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="decla_men_rete_con" language="groovy" pageWidth="1000" pageHeight="612" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="960" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.5026296018031562"/>
	<property name="ireport.x" value="357"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/nomina/decla_men_rete_con"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="whereFuncionarioTipoDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereFuncionarioNumDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo_filtro" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="nombre_periodo" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_anhos" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_meses" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select

tab0.ID_TIPO_DOC,
tab0.NUM_DOC,
tab0.NOMBRE_APELLIDO,
tab0.NOMBRE_COMPLETO,
tab0.id_meses,
tab0.id_anhos,
mes.descripcion || '-' || tab0.id_anhos as periodo,

sum(tab0.VALOR_LIQUIDADO) + sum(nvl(retro.VALOR_LIQUIDADO,0)) as VALOR_LIQUIDADO,
sum(tab0.valor_base_liq) as valor_base_liq,
sum(tab0.valor_liq_extra) as valor_liq_extra,
sum(tab0.valor_base_extra) as valor_base_extra

from(

    select
    tab0.id_meses,
    tab0.id_anhos,
    --tab0.codigo_tipper,
    tab0.ID_TIPO_DOC,
    tab0.NUM_DOC,
    --tab0.ID_PERIODO,
    tab0.NOMBRE_APELLIDO,
    tab0.NOMBRE_COMPLETO,
    sum(tab0.VALOR_LIQUIDADO) as VALOR_LIQUIDADO,

    case
    when sum(tab0.VALOR_BASE) > 0 then round(sum(tab0.VALOR_BASE),-3)
    when max(tab1.id_tipo_proced_rete) != 1
    then round(sum(tab0.valor_liquidado) * 100 / case when max(tab0.porcentaje) != 0 then max(tab0.porcentaje) else 100 end ,-3)
    else round(sum(tab0.VALOR_BASE),-3) end as valor_base_liq,

	sum(tab0.valor_liq_extra) as valor_liq_extra,
	sum(tab0.valor_base_extra) as valor_base_extra/*,
    tab0.descripcion_tipper || ' ' || tab0.id_meses || ' - ' || tab0.id_anhos as periodo*/

    from(

            select
            liq.ID_LIQUIDA_NOMINA,
            liq.ID_TIPO_DOC,
            liq.NUM_DOC,
            liq.ID_CONCEP_NOMINA,
            liq.ID_PERIODO,

            case when (select id_concep_rein as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)) = liq.ID_CONCEP_NOMINA
            then liq.VALOR_LIQUIDADO *(-1)
            else liq.VALOR_LIQUIDADO end as VALOR_LIQUIDADO,


            liq.FECHA_DESDE,
            liq.FECHA_HASTA,
            liq.NUM_DIAS,
            liq.VALOR_BASE,
            liq.PORCENTAJE,
            liq.NUM_DIAS_BASE,
            liq.NOMBRE_APELLIDO,
            liq.NOMBRE_COMPLETO,
            liq.CODIGO,
            liq.DESCRIPCION,
            liq.ESTADO,
            liq.ABREVIATURA,
            liq.OPERADOR,
            liq.ID_TIPO_CONCEPTO,
            liq.CODIGO_TIPCON,
            liq.DESCRIPCION_TIPCON,
            liq.ORDEN,
            liq.ID_ANHOS,
            liq.ID_MESES,
            liq.FECHA_INI,
            liq.FECHA_FIN,
            liq.ESTADO_PER,
            liq.ACTIVO_PER,
            liq.ID_TIPO_PERIODO,
            liq.CODIGO_TIPPER,
            liq.DESCRIPCION_TIPPER,
	        nln.valor_liq_extra,
	        nln.valor_base_extra

            from no_liquida_nomina_v liq

            left join no_liquida_nomina nln ON liq.id_liquida_nomina=nln.id_liquida_nomina

            where
            liq.id_concep_nomina in (
                select id_concep_ajuste as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)
                union
                select id_concep_rein as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)
                union
                (select no_param_concep.id_concep_rete as concep from no_param_concep)
            )
            --and nln.valor_liq_extra>0 or nln.valor_base_extra>0
            and liq.id_tipo_periodo != 5

    )tab0

    left join (
         select
          aut.*,
           ROW_NUMBER() OVER (
            partition by aut.num_doc
            ORDER BY aut.id_novedad_proced_rete desc, estado desc
           ) AS rn
          from no_novedad_proced_rete aut
    )tab1
    on tab1.num_doc = tab0.num_doc
    and tab1.rn = 1

    where
    tab0.id_anhos = $P{id_anhos}
    and tab0.id_meses = $P{id_meses}
    $P!{whereFuncionarioNumDoc} $P!{whereFuncionarioTipoDoc}
    and ( tab0.valor_liq_extra != 0 or tab0.ID_TIPO_PERIODO in (3,4) )

    group by
    tab0.ID_TIPO_DOC,
    tab0.NUM_DOC,
    --tab0.ID_PERIODO,
    tab0.NOMBRE_APELLIDO,
    tab0.NOMBRE_COMPLETO,
    --tab0.descripcion_tipper,
    tab0.id_meses,
    tab0.id_anhos--,tab0.codigo_tipper


)tab0

left join meses mes on mes.id_meses = tab0.id_meses

left join(

    select
    liq.id_liquida_nomina,
    liq.id_tipo_doc,
    liq.num_doc,
    liq.id_concep_nomina,
    liq.id_periodo,

    case when (select id_concep_rein as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)) = liq.id_concep_nomina
    then liq.valor_liquidado *(-1)
    else liq.valor_liquidado end as valor_liquidado,


    liq.fecha_desde,
    liq.fecha_hasta,
    liq.num_dias,
    liq.valor_base,
    liq.porcentaje,
    liq.num_dias_base,
    liq.nombre_apellido,
    liq.nombre_completo,
    liq.codigo,
    liq.descripcion,
    liq.estado,
    liq.abreviatura,
    liq.operador,
    liq.id_tipo_concepto,
    liq.codigo_tipcon,
    liq.descripcion_tipcon,
    liq.orden,
    liq.id_anhos,
    liq.id_meses,
    liq.fecha_ini,
    liq.fecha_fin,
    liq.estado_per,
    liq.activo_per,
    liq.id_tipo_periodo,
    liq.codigo_tipper,
    liq.descripcion_tipper

    from no_liquida_nomina_v liq

    where
    liq.id_concep_nomina in (
        select id_concep_ajuste as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)
        union
        select id_concep_rein as concep from no_concep_nomina where id_concep_nomina = (select no_param_concep.id_concep_rete from no_param_concep)
        union
        (select no_param_concep.id_concep_rete as concep from no_param_concep)
    )
    and liq.id_tipo_periodo in (6,7)

)retro
on retro.id_anhos  = tab0.id_anhos
and retro.id_meses = tab0.id_meses
and retro.id_tipo_doc = tab0.id_tipo_doc
and retro.num_doc = tab0.num_doc

having sum(tab0.valor_liq_extra) > 0

group by
tab0.ID_TIPO_DOC,
tab0.NUM_DOC,
tab0.NOMBRE_APELLIDO,
tab0.NOMBRE_COMPLETO,
tab0.id_meses,
mes.descripcion,
tab0.id_anhos

order by
tab0.id_anhos,
tab0.id_meses,
tab0.num_doc]]>
	</queryString>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="NOMBRE_APELLIDO" class="java.lang.String"/>
	<field name="NOMBRE_COMPLETO" class="java.lang.String"/>
	<field name="ID_MESES" class="java.math.BigDecimal"/>
	<field name="ID_ANHOS" class="java.math.BigDecimal"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="VALOR_LIQUIDADO" class="java.math.BigDecimal"/>
	<field name="VALOR_BASE_LIQ" class="java.math.BigDecimal"/>
	<field name="VALOR_LIQ_EXTRA" class="java.math.BigDecimal"/>
	<field name="VALOR_BASE_EXTRA" class="java.math.BigDecimal"/>
	<variable name="sum_rete" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIQ_EXTRA}]]></variableExpression>
	</variable>
	<variable name="sum_base" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_BASE_EXTRA}]]></variableExpression>
	</variable>
	<variable name="variable1" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIQUIDADO}]]></variableExpression>
	</variable>
	<variable name="variable2" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{VALOR_LIQ_EXTRA}-$F{VALOR_LIQUIDADO}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<staticText>
				<reportElement x="200" y="0" width="560" height="40"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="11" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema General de Nómina
Declaración Mensual de Retención en la Fuente Contingente]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="10" width="200" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="760" y="10" width="200" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha de Impresión:]]></text>
			</staticText>
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement x="760" y="22" width="200" height="12"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="200" y="40" width="560" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Detallado: " + $P{id_anhos} + " - " + $P{id_meses}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="21" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="12" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="200" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Periodo]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="552" y="0" width="100" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Base Contingente]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="652" y="0" width="108" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Retención Contingente]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="300" y="0" width="252" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nombre]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="200" y="0" width="100" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Documento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="760" y="0" width="100" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Retención Nómina]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="860" y="0" width="100" height="12" forecolor="#000000" backcolor="#88C2F9"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Valor Diferencia Contingente]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="200" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PERIODO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement x="552" y="0" width="100" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_BASE_EXTRA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="200" y="0" width="100" height="10"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="300" y="0" width="252" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_APELLIDO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="760" y="0" width="100" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_LIQUIDADO}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="652" y="0" width="108" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_LIQ_EXTRA}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)">
				<reportElement x="860" y="0" width="100" height="10"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{VALOR_LIQ_EXTRA}-$F{VALOR_LIQUIDADO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="10" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<printWhenExpression><![CDATA[!$P{IS_IGNORE_PAGINATION}]]></printWhenExpression>
			<textField>
				<reportElement mode="Opaque" x="402" y="12" width="89" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Página "+$V{PAGE_NUMBER}+" de "]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
				<reportElement mode="Opaque" x="492" y="12" width="60" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="402" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Nómina]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="25" splitType="Stretch">
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="552" y="0" width="100" height="9" forecolor="#000000" backcolor="#D2D8E0"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_base}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="652" y="0" width="108" height="9" forecolor="#000000" backcolor="#D2D8E0"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sum_rete}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="552" height="9" forecolor="#000000" backcolor="#D2D8E0"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Total"]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="760" y="0" width="100" height="9" forecolor="#000000" backcolor="#D2D8E0"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{variable1}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement mode="Opaque" x="860" y="0" width="100" height="9" forecolor="#000000" backcolor="#D2D8E0"/>
				<box rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{variable2}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="960" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
