<?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="declara_jura_depen_relaciones" language="groovy" pageWidth="512" pageHeight="750" columnWidth="512" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.6105100000000008"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/radicacionvirtualcuentas/declara_jura_depen"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="id_declara_jura_nov" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[NULL]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
decj.id_declara_jura_novdet,
decj.id_declara_jura_nov,
decj.id_tipo_doc,
tipdoc.abreviacion as abreviacion_tipdoc,
decj.num_doc,
replace(TO_CHAR(decj.num_doc, 'FM9999,999,999,999'),',','.') as num_doc_text,
decj.razon_social,
decj.edad,
decj.id_tipo_parentezco,
initcap(tipparent.DESCRIPCION) as parentezco


from rvc_declara_jura_novdet decj
LEFT JOIN tipo_documento tipdoc on tipdoc.id_tipo_doc = decj.id_tipo_doc
LEFT JOIN tipo_parentezco tipparent on tipparent.ID_TIPO_PARENTEZCO = decj.ID_TIPO_PARENTEZCO

where
decj.id_declara_jura_nov = $P{id_declara_jura_nov}

order by
decj.id_declara_jura_nov,
decj.edad desc,
decj.num_doc]]>
	</queryString>
	<field name="ID_DECLARA_JURA_NOVDET" class="java.math.BigDecimal"/>
	<field name="ID_DECLARA_JURA_NOV" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="ABREVIACION_TIPDOC" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="NUM_DOC_TEXT" class="java.lang.String"/>
	<field name="RAZON_SOCIAL" class="java.lang.String"/>
	<field name="EDAD" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_PARENTEZCO" class="java.math.BigDecimal"/>
	<field name="PARENTEZCO" class="java.lang.String"/>
	<columnHeader>
		<band height="30">
			<staticText>
				<reportElement x="0" y="0" width="70" height="30"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Tipo de Documento]]></text>
			</staticText>
			<staticText>
				<reportElement x="70" y="0" width="95" height="30"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No. de Identificación]]></text>
			</staticText>
			<staticText>
				<reportElement x="165" y="0" width="232" height="30"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Nombres y Apellidos]]></text>
			</staticText>
			<staticText>
				<reportElement x="397" y="0" width="35" height="30"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Edad]]></text>
			</staticText>
			<staticText>
				<reportElement x="432" y="0" width="80" height="30"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Parentesco]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="18" splitType="Stretch">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="70" height="18"/>
				<box leftPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIACION_TIPDOC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="70" y="0" width="95" height="18"/>
				<box leftPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC_TEXT}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="165" y="0" width="232" height="18"/>
				<box leftPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOCIAL}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="397" y="0" width="35" height="18"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{EDAD}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="432" y="0" width="80" height="18"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PARENTEZCO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
</jasperReport>
