<?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_facilidad_pago" language="groovy" pageWidth="800" pageHeight="612" orientation="Landscape" columnWidth="760" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="2.0"/>
	<property name="ireport.x" value="214"/>
	<property name="ireport.y" value="2"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/nomina/no_tip_com"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="fecha_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="fecha_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCodTitulo" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereOficio" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereAnhoRemision" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereNoResolucion" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT tab0.* FROM (



SELECT
	         tab0.id_facilidad_pago AS id_facilidad_pago,
                   tab0.id_proceso_coactivo AS id_proceso_coactivo,
                   tab0.id_avoca_conoc AS id_avoca_conoc,
                   TO_CHAR(tab0.fecha_registro,'YYYY-MM-DD') AS fecha_registro_text,
                   tab0.fecha_registro,
                   tab0.id_remision_titulo AS id_remision_titulo,
                  to_char(tab1.no_proceso) AS no_resolucion,
                   TO_CHAR(tab1.fecha,'YYYY-MM-DD') AS fecha_coactivo,
                  to_char(tab1.id_anhos)AS id_anhos,
                   tab2.no_auto AS no_auto,
                   TO_CHAR(tab2.fecha,'YYYY-MM-DD') AS fecha,
                   tab2.observaciones AS observaciones,
                   tab2.id_tipo_documento AS id_tipo_documento,
                   tab3.numero_remision AS numero_remision,
                   tab3.anho_remision AS anho_remision,
                   TO_CHAR(tab3.fecha_remision,'YYYY-MM-DD') AS fecha_remision,
                   tab3.estado AS estado,
                   tab3.cod_titulo AS cod_titulo,
                   tab4.mineral AS mineral,
                   tab4.id_debito AS id_debito,
                   tab4.id_mineral AS id_mineral,
                   tab5.descripcion AS descripcion_tipdoc
            FROM CBR_FACILIDAD_PAGO_V tab0
              LEFT JOIN CBR_PROCESO_COACTIVO tab1 ON tab0.id_proceso_coactivo = tab1.id_proceso_coactivo
              LEFT JOIN CBR_REMISION_TITULO tab3 ON tab0.id_remision_titulo = tab3.id_remision_titulo
              LEFT JOIN CBR_AVOCA_CONOC tab2 ON tab0.id_avoca_conoc = tab2.id_avoca_conoc
              LEFT JOIN CBR_TITULO_MINERO_V tab4 ON tab3.cod_titulo = tab4.cod_titulo
              LEFT JOIN CBR_TIPO_DOCUMENTO tab5 ON tab2.id_tipo_documento = tab5.id_tipo_documento



)tab0

WHERE 1=1
AND tab0.fecha_registro BETWEEN to_date($P{fecha_ini},'dd/mm/yyyy') AND to_date($P{fecha_fin},'dd/mm/yyyy')
$P!{whereCodTitulo}
$P!{whereOficio}
$P!{whereAnhoRemision}
$P!{whereNoResolucion}]]>
	</queryString>
	<field name="ID_FACILIDAD_PAGO" class="java.math.BigDecimal"/>
	<field name="ID_PROCESO_COACTIVO" class="java.math.BigDecimal"/>
	<field name="ID_AVOCA_CONOC" class="java.math.BigDecimal"/>
	<field name="FECHA_REGISTRO_TEXT" class="java.lang.String"/>
	<field name="FECHA_REGISTRO" class="java.sql.Timestamp"/>
	<field name="ID_REMISION_TITULO" class="java.math.BigDecimal"/>
	<field name="NO_RESOLUCION" class="java.lang.String"/>
	<field name="FECHA_COACTIVO" class="java.lang.String"/>
	<field name="ID_ANHOS" class="java.lang.String"/>
	<field name="NO_AUTO" class="java.lang.String"/>
	<field name="FECHA" class="java.lang.String"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="ID_TIPO_DOCUMENTO" class="java.math.BigDecimal"/>
	<field name="NUMERO_REMISION" class="java.math.BigDecimal"/>
	<field name="ANHO_REMISION" class="java.math.BigDecimal"/>
	<field name="FECHA_REMISION" class="java.lang.String"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="COD_TITULO" class="java.lang.String"/>
	<field name="MINERAL" class="java.lang.String"/>
	<field name="ID_DEBITO" class="java.math.BigDecimal"/>
	<field name="ID_MINERAL" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION_TIPDOC" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="60" splitType="Stretch">
			<textField pattern="dd/MM/yyyy h.mm a">
				<reportElement mode="Opaque" x="560" y="22" width="200" 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 mode="Opaque" x="560" y="10" width="200" 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>
			<image>
				<reportElement x="0" y="0" width="180" height="40"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement x="320" y="22" width="240" height="18"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Informe Facilidad de Pago]]></text>
			</staticText>
			<textField pattern="">
				<reportElement mode="Opaque" x="320" y="40" width="240" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Desde: "+$P{fecha_ini}+" Hasta: "+$P{fecha_fin}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="320" y="0" width="240" height="22"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Sistema de Cobro Coactivo]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band height="21" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="11" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="100" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Número AUTO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="100" y="0" width="80" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="320" y="0" width="140" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tipo Documento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="460" y="0" width="100" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[No. Proceso]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="560" y="0" width="100" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[No. Avoca]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="180" y="0" width="140" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Recepción Titulo]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="660" y="0" width="100" height="11" forecolor="#000000" backcolor="#A4CFF6"/>
				<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="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Año Remision]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="11" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="100" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="2" bottomPadding="1">
					<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="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NO_AUTO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="100" y="0" width="80" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<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="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_REGISTRO_TEXT}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="320" y="0" width="140" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="0" bottomPadding="1" 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="Center" 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[$F{DESCRIPCION_TIPDOC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="460" y="0" width="100" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="0" bottomPadding="1" 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="Center" 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[$F{NO_RESOLUCION}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="560" y="0" width="100" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="0" bottomPadding="1" 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="Center" 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[$F{NO_AUTO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="180" y="0" width="140" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="0" bottomPadding="1" 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="Center" 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[$F{COD_TITULO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="660" y="0" width="100" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
				<box topPadding="1" leftPadding="0" bottomPadding="1" 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="Center" 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[$F{ID_ANHOS}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="23" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="24" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="320" y="0" width="240" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Websafi - CobroCoactivo]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="28" splitType="Stretch"/>
	</summary>
	<noData>
		<band height="20">
			<staticText>
				<reportElement x="0" y="0" width="760" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[No hay objetos a mostrar.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
