<?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="report name" pageWidth="580" pageHeight="680" columnWidth="540" 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"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/canon/inf_recibos_vencidos"/>
	<property name="ireport.jasperserver.url" value="http://soporte6.sofhouse.net:8090/jasperserver/services/repository"/>
	<parameter name="fecha_fin" class="java.lang.String">
		<defaultValueExpression><![CDATA["01/01/2014"]]></defaultValueExpression>
	</parameter>
	<parameter name="fecha_ini" class="java.lang.String">
		<defaultValueExpression><![CDATA["01/01/2012"]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCompetencia" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereModalidad" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCodExp" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="wherePago" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTitulo" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT * FROM (SELECT   tab0.placa_rmn as placa_rmn, tab0.cod_exp as cod_exp, to_char(tab0.fecha_inscripcion_rmn, 'dd-mm-yyyy') as fecha_registro, to_char(tab0.fecha_contrato, 'dd-mm-yyyy') as fecha_contrato, tab0.id_titulo as id_titulo
, tab3.id_etapa as id_etapa, tab3.id_modalidad as id_modalidad
, tab4.nombre as nombre_etap, tab4.abreviacion as abreviacion
, tab5.nombre as nombre_mod
, tab7.descripcion as nombre_nor, tab7.id_norma as id_norma, tab8.cod_expediente as cod_expediente
, tab10.nombre as nombre_comp, tab10.id_competencia as id_competencia
, tab11.area/10000 as area
FROM RMN_TITULO tab0
JOIN CA_TITULO_ETAPA tab1 ON tab0.id_titulo = tab1.id_titulo
JOIN RMN_TITULO_MODALIDAD tab2 ON tab0.id_titulo = tab2.id_titulo
JOIN CA_ETAPA_MODALIDAD tab3 ON tab1.id_etapa = tab3.id_etapa AND tab2.id_modalidad = tab3.id_modalidad
JOIN CA_ETAPA tab4 ON tab1.id_etapa = tab4.id_etapa
JOIN RMN_MODALIDAD tab5 ON tab2.id_modalidad = tab5.id_modalidad
JOIN CA_TITULO_NORMA tab6 ON tab0.id_titulo = tab6.id_titulo
JOIN CA_NORMA_CANON tab7 ON tab6.id_norma = tab7.id_norma
JOIN IN_TITULO_COMPETENCIA tab9 ON tab0.id_titulo = tab9.id_titulo
JOIN RMN_COMPETENCIA tab10 ON tab9.id_competencia = tab10.id_competencia
JOIN IN_TITULO_AREA tab11 ON tab0.id_titulo = tab11.id_titulo
LEFT JOIN CA_RECIBO_SOLICITUD tab8 ON tab0.cod_exp = tab8.cod_expediente
WHERE
tab0.fecha_inscripcion_rmn between to_Date($P{fecha_ini}, 'dd/mm/yyyy') and to_Date($P{fecha_fin}, 'dd/mm/yyyy')
and tab6.actual = 1 AND tab2.actual = 1 AND tab8.id_recibo_solicitud is null  AND tab3.orden = 1 AND tab1.actual = 1 AND tab9.actual = 1
AND tab11.actual = 1 and tab10.num_doc = '8999992948'
ORDER BY  tab10.nombre, cod_exp  )tab0
where 1 = 1
$P!{whereCodExp}
$P!{whereCompetencia}
$P!{whereModalidad}$P!{whereTitulo}]]>
	</queryString>
	<field name="PLACA_RMN" class="java.lang.String"/>
	<field name="COD_EXP" class="java.lang.String"/>
	<field name="FECHA_REGISTRO" class="java.lang.String"/>
	<field name="FECHA_CONTRATO" class="java.lang.String"/>
	<field name="ID_TITULO" class="java.math.BigDecimal"/>
	<field name="ID_ETAPA" class="java.math.BigDecimal"/>
	<field name="ID_MODALIDAD" class="java.math.BigDecimal"/>
	<field name="NOMBRE_ETAP" class="java.lang.String"/>
	<field name="ABREVIACION" class="java.lang.String"/>
	<field name="NOMBRE_MOD" class="java.lang.String"/>
	<field name="NOMBRE_NOR" class="java.lang.String"/>
	<field name="ID_NORMA" class="java.math.BigDecimal"/>
	<field name="COD_EXPEDIENTE" class="java.lang.String"/>
	<field name="NOMBRE_COMP" class="java.lang.String"/>
	<field name="ID_COMPETENCIA" class="java.math.BigDecimal"/>
	<field name="AREA" class="java.math.BigDecimal"/>
	<variable name="num_registros" class="java.math.BigDecimal" calculation="Count">
		<variableExpression><![CDATA[$F{ID_TITULO}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="45" splitType="Stretch">
			<staticText>
				<reportElement x="79" y="10" width="351" height="28"/>
				<textElement textAlignment="Center">
					<font size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[SISTEMA GENERAL DE CANON SUPERFICIARIO
INFORME RECIBOS RECIBOS FALTANTES PRIMERA ANUALIDAD]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="430" y="11" width="104" height="15" 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 Impresion]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy  hh:mm aaa">
				<reportElement x="430" y="23" width="104" height="15"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<image>
				<reportElement x="0" y="11" width="79" height="29"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:logo_entidad_2.png"]]></imageExpression>
			</image>
		</band>
	</title>
	<pageHeader>
		<band height="8" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="0" y="10" width="63" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[COD. EXPED]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="487" y="10" width="53" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[ÁREA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="405" y="10" width="52" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[NORMA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="131" y="10" width="66" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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 CONTRATO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="63" y="10" width="68" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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 REGISTRO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="292" y="10" width="114" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[MODALIDAD]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="457" y="10" width="30" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[ETAPA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="197" y="10" width="96" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[COMPETENCIA]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="0" width="63" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COD_EXP}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.0000 Ha;(#,##0.0000 Ha)" isBlankWhenNull="true">
				<reportElement x="487" y="0" width="53" height="20"/>
				<box leftPadding="2" rightPadding="6">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{AREA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="457" y="0" width="30" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ABREVIACION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="406" y="0" width="51" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_NOR}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="293" y="0" width="113" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_MOD}]]></textFieldExpression>
			</textField>
			<textField pattern="###0" isBlankWhenNull="true">
				<reportElement x="131" y="0" width="66" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_CONTRATO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="63" y="0" width="68" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{FECHA_REGISTRO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="197" y="0" width="96" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NOMBRE_COMP}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="17" splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band height="21" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="79" height="10"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{num_registros}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="79" y="0" width="461" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#87CAD2"/>
				<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[TOTAL]]></text>
			</staticText>
		</band>
	</summary>
</jasperReport>
