'DPCA' and c.PROVINCECODE =f.provincecode --left join tcustpersondetail d on f.personcode = d.personcode and to_char(d.dateto,'dd-MM-yyyy') = '31-12-2999' left join tcustpersondetail d on f.personcode = d.personcode and d.dateto = to_date('31/12/2999','dd/MM/yyyy') left join tcustpersondetail resp on a.personcode = resp.personcode and resp.dateto = to_date('31/12/2999','dd/MM/yyyy') --left join tarmtramite e on e.ctramite =b.ctramite where a.fecharegistro >= to_date($P{fechaInicio} ,'dd/MM/yyyy') and a.fecharegistro <= to_date($P{fechaFin} ,'dd/MM/yyyy') --and b.CDOCUMENTO =(select max(z.cdocumento) from tarmdocumentohabilitante z where z.personcode=a.personcode) and a.planificado<>'T' $P!{filtro} union select c.ccentrocontrol, (select cd.description from tgenecatalogdetail cd where cd.catalog = c.nombreinstitucion and cd.catalogcode = cd.catalogcode) as centro, d.identification as cedula, d.name as nombre, case a.planificado when 'T' then 'TRÁMITE' when 'N' then 'NO PLANIFICADO' when 'P' then 'PLANIFICADO' else 'N/A' end as tipotramite, a.fecharegistro as fecha, (select cd.description from tgenecatalogdetail cd where cd.catalog = e.tipoautorizacion and cd.catalogcode = e.tipoautorizacioncodigo) as tramite, (select cd.description from tgenecatalogdetail cd where cd.catalog = e.categoria and cd.catalogcode = e.categoriacodigo) as categoria, (select cd.description from tgenecatalogdetail cd where cd.catalog = e.usoactividad and cd.catalogcode = e.usoactividadcodigo) as usoact, a.numordentrabajo as numtramite, d.personcode as persona, f.csitioalmacenamiento, f.provincecode, c.provincecode, resp.name as inspector from tarminspeccion a inner join tarmsolicitud b on b.csolicitud = a.csolicitud inner join tarmsolicitudtramite tram on tram.csolicitud = a.csolicitud inner join tarmsitioalmacenamiento f on f.csitioalmacenamiento=a.CSITIOALMACENAMIENTO inner join tarmtramite e on e.ctramite = a.ctramite inner join tcustpersondetail d on f.personcode = d.personcode and d.dateto = to_date('31/12/2999','dd/MM/yyyy') left join tcustpersondetail resp on a.personcode = resp.personcode and resp.dateto = to_date('31/12/2999','dd/MM/yyyy') left join tarmcentrocontrol c on b.ccentrocontrol = c.ccentrocontrol where ((tram.valorapagar>0 and tram.valorverificado is not null) or tram.valorapagar = 0) and a.fecharegistro >= to_date($P{fechaInicio} ,'dd/MM/yyyy') and a.fecharegistro <= to_date($P{fechaFin} ,'dd/MM/yyyy') and a.planificado='T' $P!{filtro}]]> <band height="110" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <staticText> <reportElement style="title" x="161" y="16" width="637" height="20" forecolor="#000000" uuid="a5555ed3-8bce-44fd-afbb-28084239a1a1"> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textElement textAlignment="Center"/> <text><![CDATA[COMANDO CONJUNTO DE LAS FUERZAS ARMADAS]]></text> </staticText> <staticText> <reportElement key="" style="title1" x="161" y="36" width="637" height="18" forecolor="#000000" uuid="98c268e9-4cb8-4184-9c02-537b79b6957c"> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textElement textAlignment="Center"/> <text><![CDATA[DEPARTAMENTO DE CONTROL DE ARMAS]]></text> </staticText> <image> <reportElement x="102" y="16" width="59" height="82" uuid="5c1c706c-0485-4d8f-be4c-9ad18ad76225"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <imageExpression><![CDATA[$P{pathLogoIzquierda}]]></imageExpression> </image> <staticText> <reportElement key="" style="title2" x="161" y="68" width="637" height="16" forecolor="#000000" uuid="a056d06a-cfc1-4922-b643-c38d1a76ced3"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement textAlignment="Center"/> <text><![CDATA[REPORTE DE INSPECCIONES REALIZADAS]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="title3" stretchType="RelativeToTallestObject" x="161" y="54" width="637" height="14" forecolor="#000000" uuid="f4e50898-607e-47f7-91c1-0475bd3f03db"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> </reportElement> <box leftPadding="2" rightPadding="2"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Center" verticalAlignment="Top"> <font size="7"/> </textElement> <textFieldExpression><![CDATA[$P{nombreCentroControl}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="title3" stretchType="RelativeToTallestObject" x="161" y="84" width="637" height="14" forecolor="#000000" uuid="ee1583cc-bd25-47ce-a6cf-05dbd1bdbb8c"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> </reportElement> <box leftPadding="2" rightPadding="2"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Center" verticalAlignment="Top"> <font size="7"/> </textElement> <textFieldExpression><![CDATA["De: "+$P{fechaInicio} + " Al: "+$P{fechaFin}]]></textFieldExpression> </textField> <image> <reportElement x="798" y="16" width="90" height="94" uuid="7c474f2a-dd84-49ba-9e39-27cad34e3c89"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <imageExpression><![CDATA[$P{pathLogoDerecha}]]></imageExpression> </image> </band>