maia/.svn/pristine/94/943c5f5a68bf0de64a5a9f3341d...

423 lines
21 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="reporteNumeroPermisos" pageWidth="650" pageHeight="842" columnWidth="610" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="80331279-9be4-4003-ad3d-d3b8bfdf2084">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="58"/>
<template><![CDATA[$P{pathstyle}]]></template>
<parameter name="pathstyle" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["repo:/maia/1/style/style"]]></defaultValueExpression>
</parameter>
<parameter name="pathLogoIzquierda" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:/maia/1/image/comandoconjunto"]]></defaultValueExpression>
</parameter>
<parameter name="pathLogoDerecha" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:/maia/1/image/selloarmas"]]></defaultValueExpression>
</parameter>
<parameter name="filtroPersona" class="java.lang.String"/>
<parameter name="usuario" class="java.lang.String">
<parameterDescription><![CDATA[]]></parameterDescription>
</parameter>
<parameter name="fecActual" class="java.lang.String"/>
<queryString>
<![CDATA[select
--DATOS DE LA PERSONA
personadetalle.identification as cedula,
personadetalle.name as nombre,
--DATOS DE LA SOLICITUD
actividad.description as usoactividad,
--tipotramite.description as tipotramite,
categoria.description as categoria,
autorizacion.description as tramite, count(personadetalle.identification)AS numero
from tarmsolicitud solicitud
inner join tarmsolicitudtramite soltramite on soltramite.csolicitud = solicitud.csolicitud
inner join tarmtramite tramite on tramite.ctramite = soltramite.ctramite
--TIPO DE TRAMITE
left join tgenecatalogdetail tipotramite on tipotramite.catalog=tramite.tipotramite and tipotramite.catalogcode=tramite.tipotramitecodigo
--CATEGORIA
left join tgenecatalogdetail categoria on categoria.catalog=tramite.categoria and categoria.catalogcode=tramite.categoriacodigo
--AUTORIZACION
left join tgenecatalogdetail autorizacion on autorizacion.catalog=tramite.tipoautorizacion and autorizacion.catalogcode=tramite.tipoautorizacioncodigo
--USO ACTIVIDAD
left join tgenecatalogdetail actividad on actividad.catalog=tramite.usoactividad and actividad.catalogcode=tramite.usoactividadcodigo
--DATOS DE LA PERSONA
inner join tcustperson persona on persona.personcode = solicitud.personcode
inner join tcustpersondetail personadetalle
on personadetalle.personcode = persona.personcode
and to_char(personadetalle.dateto,'yyyy-MM-dd') = '2999-12-31'
inner join tcustpersonaddress personadireccion
on personadireccion.personcode = personadetalle.personcode and personadireccion.principal = 'Y'
and personadireccion.dateto = TO_DATE (TO_CHAR (personadetalle.dateto, 'YYYY-MON-DD HH24:MI:SS'),'YYYY-MON-DD HH24:MI:SS')
left join tcustpeople p
on p.personcode = personadetalle.personcode
and p.dateto = TO_DATE (TO_CHAR (p.dateto, 'YYYY-MON-DD HH24:MI:SS'),'YYYY-MON-DD HH24:MI:SS')
--DATOS DE PAIS,PROVINCIA,CIUDAD,PARROQUIA DE LA PERSONA
inner join tgenecountry pais
on pais.countrycode = personadireccion.countrycode
inner join tgeneprovince provincia
on provincia.provincecode = personadireccion.provincecode
and provincia.countrycode = personadireccion.countrycode
inner join tgenecanton canton
on canton.cantoncode = personadireccion.cantoncode
and canton.provincecode = personadireccion.provincecode
and canton.countrycode = personadireccion.countrycode
inner join tgenecity ciudad
on ciudad.citycode = personadireccion.citycode
and ciudad.cantoncode = personadireccion.cantoncode
and ciudad.provincecode = personadireccion.provincecode
and ciudad.countrycode = personadireccion.countrycode
inner join tgeneparroquia parroquia
on parroquia.parroquiacode = personadireccion.parroquiacode
and parroquia.cantoncode = personadireccion.cantoncode
and parroquia.provincecode = personadireccion.provincecode
and parroquia.countrycode = personadireccion.countrycode
--TELEFONOS
left join tcustpersonphone phonehome
on phonehome.personcode=personadetalle.personcode
and phonehome.phonetypecatalog = 1
and to_char(phonehome.dateto,'yyyy-MM-dd') = '2999-12-31'
left join tcustpersonphone phonecel
on phonecel.personcode=personadetalle.personcode
and phonecel.phonetypecatalog = 2
and to_char(phonecel.dateto,'yyyy-MM-dd') = '2999-12-31'
--ESTADO CIVIL
left join tgenecatalogdetail estadocivil on estadocivil.catalog=p.maritalstatuscatalog
and estadocivil.catalogcode=p.maritalstatuscatalogcode
--TIPO DE PERSONA
left join tgenecatalogdetail tipopersona
on tipopersona.catalog=personadetalle.persontypecatalog
and tipopersona.catalogcode=personadetalle.persontypecatalogcode
--FECHA DE EMISION/EXPIRACION DE DOCUMENTO
inner join tarmdocumentohabilitante documento
on documento.csolicitud = solicitud.csolicitud
and documento.personcode = solicitud.personcode
--TIPO DOCUMENTO
left join tgenecatalogdetail tipodoc
on tipodoc.catalog=personadetalle.identificationcatalog
and tipodoc.catalogcode=personadetalle.identificationcatalogcode
--PROFESION
left join tgenecatalogdetail profesion
on profesion.catalog=p.professioncatalog
and profesion.catalogcode=p.professioncatalogcode
--FILTRO DE BUSQUEDA
WHERE 1=1 $P!{filtroPersona}
--AND personadetalle.identification='0190050858001'
GROUP BY personadetalle.identification,personadetalle.name, actividad.description, categoria.description,autorizacion.description
ORDER BY personadetalle.identification]]>
</queryString>
<field name="CEDULA" class="java.lang.String"/>
<field name="NOMBRE" class="java.lang.String"/>
<field name="USOACTIVIDAD" class="java.lang.String"/>
<field name="CATEGORIA" class="java.lang.String"/>
<field name="TRAMITE" class="java.lang.String"/>
<field name="NUMERO" class="java.math.BigDecimal"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="102" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement style="title" x="93" y="32" width="419" height="20" forecolor="#000000" uuid="a5555ed3-8bce-44fd-afbb-28084239a1a1"/>
<textElement textAlignment="Center"/>
<text><![CDATA[COMANDO CONJUNTO DE LAS FUERZAS ARMADAS]]></text>
</staticText>
<staticText>
<reportElement key="" style="title" x="93" y="55" width="419" height="20" forecolor="#000000" uuid="98c268e9-4cb8-4184-9c02-537b79b6957c"/>
<textElement textAlignment="Center"/>
<text><![CDATA[DEPARTAMENTO DE CONTROL DE ARMAS]]></text>
</staticText>
<staticText>
<reportElement key="" style="title" x="93" y="75" width="419" height="20" forecolor="#000000" uuid="08b3a4d0-76a3-4e33-9e28-aec26392acbe"/>
<textElement textAlignment="Center"/>
<text><![CDATA[REPORTE POR TIPO DE PERMISOS]]></text>
</staticText>
<image>
<reportElement x="1" y="16" width="70" height="70" uuid="c5d5c6f5-0999-4049-bc9a-f7b2771d11bf">
<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"/>
</reportElement>
<imageExpression><![CDATA[$P{pathLogoIzquierda}]]></imageExpression>
</image>
<image>
<reportElement x="526" y="0" width="80" height="80" uuid="d0fd6923-1b74-41b6-9519-5a415c0aacb6">
<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"/>
</reportElement>
<imageExpression><![CDATA[$P{pathLogoDerecha}]]></imageExpression>
</image>
</band>
</title>
<pageHeader>
<band height="78" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement style="title2" x="2" y="8" width="148" height="16" forecolor="#000000" uuid="910453e4-24a4-4b07-b283-bef48a980e4e"/>
<textElement textAlignment="Left"/>
<text><![CDATA[RAZÓN SOCIAL O NOMBRE:]]></text>
</staticText>
<staticText>
<reportElement style="title2" x="2" y="35" width="153" height="16" forecolor="#000000" uuid="b61fce3a-d1cc-469c-892f-0b60c3432f3c">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left"/>
<text><![CDATA[CÉDULA / RUC / PASAPORTE:]]></text>
</staticText>
<staticText>
<reportElement style="title2" x="3" y="62" width="190" height="16" forecolor="#000000" uuid="da77ab41-5ca1-41c6-bfe8-55e837d087fe"/>
<textElement textAlignment="Left"/>
<text><![CDATA[DETALLES DE PERMISOS:]]></text>
</staticText>
<textField>
<reportElement style="normal" x="150" y="7" width="438" height="16" uuid="8ddb0451-6df3-4ff1-b7a1-0f77deda8c09">
<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>
<box topPadding="2"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{NOMBRE}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="normal" x="155" y="34" width="438" height="16" uuid="6e33aa55-4990-4575-a488-b1d9586a737c">
<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>
<box topPadding="2"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{CEDULA}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="13" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement style="normalNegrita" x="21" y="0" width="200" height="13" forecolor="#000000" uuid="2855d5a8-74a4-4103-a919-ee42294f8267">
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<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"/>
</reportElement>
<box>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[ACTIVIDAD]]></text>
</staticText>
<staticText>
<reportElement style="normalNegrita" x="221" y="0" width="150" height="13" forecolor="#000000" uuid="fa752abe-ce12-4b29-bcec-c38c3f805fcd">
<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"/>
</reportElement>
<box>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[CATEGORÍA]]></text>
</staticText>
<staticText>
<reportElement style="normalNegrita" x="371" y="0" width="125" height="13" forecolor="#000000" uuid="3e5f1362-12ec-4a33-8364-453be1d29a32">
<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"/>
</reportElement>
<box>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[TRÁMITE]]></text>
</staticText>
<staticText>
<reportElement style="normalNegrita" x="496" y="0" width="64" height="13" forecolor="#000000" uuid="6e7f3ffc-cf20-4856-93aa-9fd5ac2e82d4">
<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"/>
</reportElement>
<box>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[TOTAL]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="13" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="normal" stretchType="RelativeToTallestObject" x="21" y="0" width="200" height="13" uuid="782cbd07-87c6-416d-8547-1dc7d77dea87">
<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="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box leftPadding="5" rightPadding="2">
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{USOACTIVIDAD}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="normal" stretchType="RelativeToTallestObject" x="221" y="0" width="150" height="13" uuid="598d04f9-a022-4b25-bb9d-aa574cfb029e">
<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="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box leftPadding="5" rightPadding="2">
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{CATEGORIA}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="normal" stretchType="RelativeToTallestObject" x="371" y="0" width="125" height="13" uuid="a2af8ac7-c287-48f0-b5ce-63406f2510f6">
<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="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box leftPadding="5" rightPadding="2">
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{TRAMITE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="normal" stretchType="RelativeToTallestObject" x="496" y="0" width="64" height="13" uuid="b934660d-d75d-43ee-ac9f-6a2926e47b0d">
<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="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box leftPadding="2" rightPadding="2">
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{NUMERO}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="44">
<staticText>
<reportElement key="" style="title2" x="1" y="20" width="44" height="16" uuid="bb37c901-69e3-4ccd-bd23-dad4aad2d814">
<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="Left" verticalAlignment="Middle">
<font fontName="Arial"/>
</textElement>
<text><![CDATA[Usuario:]]></text>
</staticText>
<textField>
<reportElement style="normal" x="45" y="20" width="195" height="16" uuid="fc0021bb-e611-4753-b9c6-1d42f5210c17">
<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>
<box topPadding="2" 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="Justified" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{usuario}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="" style="title2" x="303" y="20" width="105" height="16" uuid="849f8119-1297-4cd1-afea-e4245d1caa41">
<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="Left" verticalAlignment="Middle"/>
<text><![CDATA[Fecha emisión/hora:]]></text>
</staticText>
<textField>
<reportElement style="normal" x="408" y="20" width="119" height="16" uuid="d85fda92-6cfb-496c-abd3-d41ce0ea8f91">
<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>
<box topPadding="2" 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="Justified" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{fecActual}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</band>
</summary>
</jasperReport>