<?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="experiencia" language="groovy" pageWidth="572" pageHeight="555" orientation="Landscape" columnWidth="572" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.6105100000000014"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_tipo_doc" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="num_doc" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT
explab.*,
clacar.descripcion as cargo_text,
round(nvl(explab.fecha_fin,trunc(sysdate)) - explab.fecha_inicio) as dias,
total.dias as dias_total,
round(total.dias/30) as meses_total,
floor(total.dias/360) as ahno_t,
floor(floor(360*((total.dias/360) - floor(total.dias/360)))/30) as mes_t,
total.dias - (floor(total.dias/360))*360 - (floor(floor(360*((total.dias/360) - floor(total.dias/360)))/30))*30 as dia_t

FROM EXPERIENCIA_LABORAL explab

left join rh_clase_cargo clacar
on clacar.id_clase_cargo = explab.cargo

left join(
    select
    tab0.num_doc,
    tab0.id_tipo_doc,
    sum(round(nvl(tab0.fecha_fin,trunc(sysdate)) - tab0.fecha_inicio)) as dias
    from EXPERIENCIA_LABORAL tab0
    group by
    tab0.num_doc,
    tab0.id_tipo_doc
)total
on total.num_doc = explab.num_doc
and total.id_tipo_doc = explab.id_tipo_doc
where
explab.id_tipo_doc = $P{id_tipo_doc}
and explab.num_doc = $P{num_doc}

order by
explab.num_doc,
explab.fecha_inicio]]>
	</queryString>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="ID_TIPO_EXPERIENCIA" class="java.math.BigDecimal"/>
	<field name="ENTIDAD" class="java.lang.String"/>
	<field name="PUBLICA" class="java.lang.String"/>
	<field name="CARGO" class="java.lang.String"/>
	<field name="DEPENDENCIA" class="java.lang.String"/>
	<field name="FECHA_INICIO" class="java.sql.Timestamp"/>
	<field name="FECHA_FIN" class="java.sql.Timestamp"/>
	<field name="TELEFONO" class="java.lang.String"/>
	<field name="EMAIL" class="java.lang.String"/>
	<field name="DIRECCION" class="java.lang.String"/>
	<field name="ID_PAIS" class="java.math.BigDecimal"/>
	<field name="ID_DEPTO" class="java.math.BigDecimal"/>
	<field name="MUNICIPIO" class="java.math.BigDecimal"/>
	<field name="ID_EXP_LAB" class="java.math.BigDecimal"/>
	<field name="CERTIFICADO" class="java.lang.String"/>
	<field name="LABORES" class="java.lang.String"/>
	<field name="MOTIVO_CAMBIO" class="java.lang.String"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="ACTUALMENTE" class="java.math.BigDecimal"/>
	<field name="CARGO_TEXT" class="java.lang.String"/>
	<field name="DIAS" class="java.math.BigDecimal"/>
	<field name="DIAS_TOTAL" class="java.math.BigDecimal"/>
	<field name="MESES_TOTAL" class="java.math.BigDecimal"/>
	<field name="AHNO_T" class="java.math.BigDecimal"/>
	<field name="MES_T" class="java.math.BigDecimal"/>
	<field name="DIA_T" class="java.math.BigDecimal"/>
	<variable name="dias" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{DIAS}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="12" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="0" y="0" width="100" height="12" forecolor="#000000" backcolor="#E8E8E8"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["ENTIDAD"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="512" y="0" width="60" height="12" forecolor="#000000" backcolor="#E8E8E8"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["DÍAS"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="412" y="0" width="100" height="12" forecolor="#000000" backcolor="#E8E8E8"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TIEMPO DE SERVICIO"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="100" y="0" width="150" height="12" forecolor="#000000" backcolor="#E8E8E8"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["CARGO"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Opaque" x="250" y="0" width="162" height="12" forecolor="#000000" backcolor="#E8E8E8"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["FUNCIONES"]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="30" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="0" width="100" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ENTIDAD}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="100" y="0" width="150" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CARGO_TEXT}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="250" y="0" width="162" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LABORES}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="512" y="0" width="60" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIAS}]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="412" y="0" width="50" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_INICIO}]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="462" y="0" width="50" height="30" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_FIN}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="40" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="20" width="100" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["EXPERIENCIA ACREDITADA"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="100" y="20" width="100" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{AHNO_T} + " AÑO(S)"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="200" y="20" width="113" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MES_T} + " MES(S)"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="313" y="20" width="99" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DIA_T} + " DIA(S)"]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="412" y="20" width="100" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TOTAL MESES " + $F{MESES_TOTAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="512" y="20" width="60" height="20" forecolor="#000000" backcolor="#FEF2F2"/>
				<box leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["TOTAL DIAS " + $V{dias}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="250" y="0" width="162" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="512" y="0" width="60" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
			</textField>
			<textField pattern="dd-MMM-yy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="412" y="0" width="50" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="462" y="0" width="50" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="0">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="100" y="0" width="150" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="0" width="100" height="20" forecolor="#000000"/>
				<box topPadding="0" leftPadding="2">
					<pen lineWidth="0.75" lineStyle="Solid"/>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="7" isBold="false"/>
				</textElement>
			</textField>
		</band>
	</summary>
</jasperReport>
