<?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="inf_chequeo_doc" language="groovy" pageWidth="612" pageHeight="792" whenNoDataType="NoDataSection" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.6105100000000014"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="cod_titulo" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="id_remision_titulo_det" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
rownum,
tab0.*

from(

    select distinct
    tab0.id_chequeo_documentos,
    tab1.id_remision_titulo,
    tab0.id_documentos,
    tab0.observaciones,
    tab0.recibido,
    tab2.id_referencia2,
    to_char(tab1.fecha_remision,'dd/mm/yyyy') AS FECHA_RECIBO,
    tab3.descripcion AS PAR,
    tab1.numero_correpondencia,
    tab1.no_folios,tab4.titulares,
    tab5.descripcion as tipo_documento,
    decode(nvl(tab0.recibido,0),0,'NO',1,'SI') AS RECIBO,

    det.cod_titulo,
    det.id_remision_titulo_det

    from cbr_remision_titulo tab1

    left join cbr_remision_titulo_det det
    on tab1.id_remision_titulo = det.id_remision_titulo

    left join cbr_documentos tab5 ON 1 = 1--tab5.id_documentos = tab0.id_documentos

    left join cbr_chequeo_documentos tab0 ON det.id_remision_titulo_det = tab0.id_remision_titulo_det
    and tab0.id_documentos = tab5.id_documentos

    left join ca_debito_ref tab2 ON tab2.id_referencia2 = det.cod_titulo
    left join cbr_par tab3 ON tab3.id_par = tab1.id_par

    left join(
        select
        tab0.cod_titulo,
        listagg(tab0.nitocc||'-'||tab0.nombre_razon,chr(10)) within group( order by tab0.nitocc ) AS TITULARES
        from cbr_actualiza_titulo tab0
        group by tab0.cod_titulo
    )tab4 ON tab4.cod_titulo = det.cod_titulo

    order by
    tab5.descripcion

)tab0

where
tab0.cod_titulo = $P{cod_titulo}
and tab0.id_remision_titulo_det = $P{id_remision_titulo_det}]]>
	</queryString>
	<field name="ROWNUM" class="java.math.BigDecimal"/>
	<field name="ID_CHEQUEO_DOCUMENTOS" class="java.math.BigDecimal"/>
	<field name="ID_REMISION_TITULO" class="java.math.BigDecimal"/>
	<field name="ID_DOCUMENTOS" class="java.math.BigDecimal"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="RECIBIDO" class="java.math.BigDecimal"/>
	<field name="ID_REFERENCIA2" class="java.lang.String"/>
	<field name="FECHA_RECIBO" class="java.lang.String"/>
	<field name="PAR" class="java.lang.String"/>
	<field name="NUMERO_CORREPONDENCIA" class="java.math.BigDecimal"/>
	<field name="NO_FOLIOS" class="java.math.BigDecimal"/>
	<field name="TITULARES" class="java.lang.String"/>
	<field name="TIPO_DOCUMENTO" class="java.lang.String"/>
	<field name="RECIBO" class="java.lang.String"/>
	<field name="COD_TITULO" class="java.lang.String"/>
	<field name="ID_REMISION_TITULO_DET" class="java.math.BigDecimal"/>
	<variable name="FECHA_RECIBO_1" class="java.lang.Integer" resetType="Page" calculation="Count">
		<variableExpression><![CDATA[$F{FECHA_RECIBO}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<textField pattern="dd-MMM-yyyy   hh:mm aaa">
				<reportElement mode="Opaque" x="421" y="38" width="150" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="141" y="0" width="280" height="50"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Cobro Coáctivo
LISTA DE CHEQUEO DOCUMENTOS
PARA INICIO DE COBRO COACTIVO]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="10" width="141" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Opaque" x="421" y="26" width="151" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha de Impresión:]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band height="172" splitType="Stretch">
			<textField>
				<reportElement x="192" y="16" width="380" height="20"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_RECIBO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="192" y="36" width="380" height="20"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PAR}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="192" y="56" width="380" height="20"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{NUMERO_CORREPONDENCIA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="192" y="76" width="380" height="20"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{NO_FOLIOS}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="192" y="96" width="380" height="20"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ID_REFERENCIA2}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="192" y="116" width="380" height="44"/>
				<box>
					<bottomPen lineWidth="1.25"/>
				</box>
				<textElement verticalAlignment="Bottom"/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TITULARES}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="16" width="192" height="20"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[FECHA DE RECIBO :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="36" width="192" height="20"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[OFICINA DE ORIGEN :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="56" width="192" height="20"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[RADICADO No.  :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="76" width="192" height="20"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[FOLIOS  :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="96" width="192" height="20"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[TITULO MINERO  :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="116" width="192" height="44"/>
				<box topPadding="2" leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[TITULARES  :]]></text>
			</staticText>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement x="37" y="0" width="435" height="20"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.25" lineStyle="Solid"/>
					<leftPen lineWidth="1.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="0.25" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Bottom">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[DOCUMENTOS REMITIDOS]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="0" width="37" height="20"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.25" lineStyle="Solid"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="0.25" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Bottom">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[No. ]]></text>
			</staticText>
			<staticText>
				<reportElement x="472" y="0" width="100" height="20"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.25" lineStyle="Solid"/>
					<leftPen lineWidth="1.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="1.5"/>
					<rightPen lineWidth="0.25" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Bottom">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[RECIBIDO]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement stretchType="RelativeToTallestObject" x="37" y="0" width="435" height="10"/>
				<box leftPadding="3">
					<leftPen lineWidth="1.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TIPO_DOCUMENTO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="0" width="37" height="10"/>
				<box>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="1.0" lineStyle="Dashed"/>
				</box>
				<textElement textAlignment="Center">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ROWNUM}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="472" y="0" width="100" height="10"/>
				<box>
					<leftPen lineWidth="1.0" lineStyle="Dashed"/>
					<bottomPen lineWidth="1.0"/>
				</box>
				<textElement textAlignment="Center">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RECIBO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="211" 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="301" y="12" width="60" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<box leftPadding="2"/>
				<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="211" y="0" width="150" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - Cobro Coactivo]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="25" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="572" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
