Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

<?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="relatorio" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="85d4a540-608e-4934-8f57-57cec53afb74">
        <property name="ireport.zoom" value="1.3310000000000004"/>
        <property name="ireport.x" value="0"/>
        <property name="ireport.y" value="0"/>
        <parameter name="IMAGEM_DIR" class="java.lang.String">
                <defaultValueExpression><![CDATA["C:\\"]]></defaultValueExpression>
        </parameter>
        <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
                <defaultValueExpression><![CDATA["C:\\Repositorio\\DESENVOLVIMENTO\\SESAU\\JAVA\\Repositorio\\rhcapacitacao\\FONTES\\IMPLEMENTACAO\\DESENVOLVIMENTO\\scs\\scs-core\\src\\main\\resources\\relatorios\\"]]></defaultValueExpression>
        </parameter>
        <parameter name="NOM_USUARIO" class="java.lang.String">
                <defaultValueExpression><![CDATA[]]></defaultValueExpression>
        </parameter>
        <parameter name="CPF_USUARIO" class="java.lang.String">
                <defaultValueExpression><![CDATA[]]></defaultValueExpression>
        </parameter>
        <parameter name="DAT_INICIAL" class="java.util.Date">
                <defaultValueExpression><![CDATA[]]></defaultValueExpression>
        </parameter>
        <parameter name="DAT_FINAL" class="java.util.Date">
                <defaultValueExpression><![CDATA[]]></defaultValueExpression>
        </parameter>
        <queryString>
                <![CDATA[SELECT
tr.num_ano, cp.dsc_capacitacao, tr.seq_turma
FROM sc_scs.scs_turma tr
INNER JOIN sc_scs.scs_capacitacao cp ON tr.seq_capacitacao = cp.seq_capacitacao
WHERE EXISTS
(
   SELECT
   tp.seq_turma_periodo
   FROM sc_scs.scs_turma_periodo tp
   WHERE
   (
      date_trunc
      (
         'day', tp.dth_data_inicial
      )
      >= $P{DAT_INICIAL} OR $P{DAT_INICIAL}::DATE IS NULL
   )
   AND
   (
      date_trunc
      (
         'day', tp.dth_data_final
      )
      <= $P{DAT_FINAL} OR $P{DAT_FINAL}::DATE IS NULL
   )
   AND tr.seq_turma = tp.seq_turma
)
ORDER BY tr.num_ano, cp.dsc_capacitacao]]>
        </queryString>
        <field name="num_ano" class="java.math.BigDecimal"/>
        <field name="dsc_capacitacao" class="java.lang.String"/>
        <field name="seq_turma" class="java.lang.Long"/>
        <group name="Ano">
                <groupExpression><![CDATA[$F{num_ano}]]></groupExpression>
                <groupHeader>
                        <band height="30">
                                <rectangle>
                                        <reportElement uuid="ec12e2f3-a174-4a7a-98ca-9718faa79aad" x="0" y="10" width="555" height="20" backcolor="#CCCCCC"/>
                                </rectangle>
                                <textField>
                                        <reportElement uuid="bd7e6eee-80f8-4b1d-a789-7078dbf18cb1" x="0" y="10" width="555" height="20" backcolor="#CCCCCC"/>
                                        <textElement textAlignment="Center" verticalAlignment="Middle">
                                                <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                                <paragraph leftIndent="10"/>
                                        </textElement>
                                        <textFieldExpression><![CDATA["ANO DE EXERCÍCIO: " + $F{num_ano}]]></textFieldExpression>
                                </textField>
                        </band>
                </groupHeader>
        </group>
        <pageHeader>
                <band height="128">
                        <staticText>
                                <reportElement uuid="36f361c7-c2c5-4f4b-9918-4f375cff39d2" x="0" y="48" width="555" height="36"/>
                                <textElement textAlignment="Center" verticalAlignment="Top">
                                        <font fontName="Arial" size="10" isBold="false" pdfFontName="Helvetica" isPdfEmbedded="true"/>
                                </textElement>
                                <text><![CDATA[Secretaria de Estado da Saúde
Coordenadoria Setorial de Gestão e Desenvolvimento de Pessoas
Gerência de Desenvolvimento e Educação de Pessoas
]]></text>
                        </staticText>
                        <image scaleImage="RealSize" hAlign="Center" vAlign="Middle" onErrorType="Icon">
                                <reportElement uuid="9cc0d6bd-ba27-4a57-903c-0182a11a1f53" positionType="Float" mode="Transparent" x="258" y="0" width="33" height="36"/>
                                <imageExpression><![CDATA[$P{IMAGEM_DIR} + "brasao.png"]]></imageExpression>
                        </image>
                        <staticText>
                                <reportElement uuid="36f361c7-c2c5-4f4b-9918-4f375cff39d2" x="0" y="37" width="555" height="12"/>
                                <textElement textAlignment="Center" verticalAlignment="Top">
                                        <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                </textElement>
                                <text><![CDATA[Estado de Alagoas]]></text>
                        </staticText>
                        <staticText>
                                <reportElement uuid="36f361c7-c2c5-4f4b-9918-4f375cff39d2" x="0" y="92" width="555" height="12"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                        <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                </textElement>
                                <text><![CDATA[Relatório de Capacitação por Período]]></text>
                        </staticText>
                        <textField>
                                <reportElement uuid="a240ee1d-c3dd-42c9-84aa-450600c70894" x="0" y="105" width="555" height="12">
                                        <printWhenExpression><![CDATA[$P{DAT_INICIAL} != null && $P{DAT_FINAL} == null]]></printWhenExpression>
                                </reportElement>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                        <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                </textElement>
                                <textFieldExpression><![CDATA["Data e Hora Inicial: " + new java.text.SimpleDateFormat("dd'/'MM'/'yyyy HH:mm:ss", new Locale("pt", "BR")).format($P{DAT_INICIAL})]]></textFieldExpression>
                        </textField>
                        <textField>
                                <reportElement uuid="a240ee1d-c3dd-42c9-84aa-450600c70894" x="0" y="105" width="555" height="12">
                                        <printWhenExpression><![CDATA[$P{DAT_INICIAL} == null && $P{DAT_FINAL} != null]]></printWhenExpression>
                                </reportElement>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                        <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                </textElement>
                                <textFieldExpression><![CDATA["Data e Hora Final: " + new java.text.SimpleDateFormat("dd'/'MM'/'yyyy HH:mm:ss", new Locale("pt", "BR")).format($P{DAT_FINAL})]]></textFieldExpression>
                        </textField>
                        <textField>
                                <reportElement uuid="a240ee1d-c3dd-42c9-84aa-450600c70894" x="0" y="105" width="555" height="12">
                                        <printWhenExpression><![CDATA[$P{DAT_INICIAL} != null && $P{DAT_FINAL} != null]]></printWhenExpression>
                                </reportElement>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                        <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                </textElement>
                                <textFieldExpression><![CDATA["Data e Hora: " + new java.text.SimpleDateFormat("dd'/'MM'/'yyyy HH:mm:ss", new Locale("pt", "BR")).format($P{DAT_INICIAL}) + " até " + new java.text.SimpleDateFormat("dd'/'MM'/'yyyy HH:mm:ss", new Locale("pt", "BR")).format($P{DAT_FINAL})]]></textFieldExpression>
                        </textField>
                </band>
        </pageHeader>
        <detail>
                <band height="30">
                        <elementGroup>
                                <rectangle>
                                        <reportElement uuid="ec12e2f3-a174-4a7a-98ca-9718faa79aad" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="10" width="555" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC"/>
                                </rectangle>
                                <textField isStretchWithOverflow="true">
                                        <reportElement uuid="bd7e6eee-80f8-4b1d-a789-7078dbf18cb1" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="10" width="555" height="20" isPrintWhenDetailOverflows="true" backcolor="#CCCCCC"/>
                                        <textElement verticalAlignment="Middle">
                                                <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
                                                <paragraph leftIndent="5" rightIndent="5"/>
                                        </textElement>
                                        <textFieldExpression><![CDATA["CAPACITAÇÃO: " + $F{dsc_capacitacao}]]></textFieldExpression>
                                </textField>
                        </elementGroup>
                </band>
                <band height="20">
                        <subreport>
                                <reportElement uuid="7254a9b5-234f-493c-b93b-350725508fbb" positionType="Float" x="0" y="0" width="555" height="20" isRemoveLineWhenBlank="true"/>
                                <subreportParameter name="SUBREPORT_DIR">
                                        <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
                                </subreportParameter>
                                <subreportParameter name="SEQ_TURMA">
                                        <subreportParameterExpression><![CDATA[$F{seq_turma}]]></subreportParameterExpression>
                                </subreportParameter>
                                <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "relatorioCapacitacaoPorPeriodo_sub_turma.jasper"]]></subreportExpression>
                        </subreport>
                </band>
        </detail>
        <pageFooter>
                <band height="15">
                        <textField isBlankWhenNull="true">
                                <reportElement uuid="0ad83100-9e7e-42de-97b6-51dc07b7dd68" x="0" y="0" width="374" height="15"/>
                                <textElement verticalAlignment="Middle">
                                        <font fontName="Arial" size="6" isBold="false"/>
                                </textElement>
                                <textFieldExpression><![CDATA["Gerado por " + $P{NOM_USUARIO} + ", CPF: " + $P{CPF_USUARIO} + new java.text.SimpleDateFormat("', em 'dd 'de' MMMMM 'de' yyyy' às 'HH:mm", new Locale("pt", "BR")).format(new java.util.Date()).toUpperCase()]]></textFieldExpression>
                        </textField>
                        <textField isBlankWhenNull="false">
                                <reportElement uuid="e5f06c72-11c0-479b-b234-4dcaf2bc0440" key="textField" x="428" y="0" width="73" height="15"/>
                                <textElement textAlignment="Right" verticalAlignment="Middle">
                                        <font fontName="Arial" size="6" isBold="false"/>
                                </textElement>
                                <textFieldExpression><![CDATA["PÁGINA " + $V{PAGE_NUMBER} + " DE "]]></textFieldExpression>
                        </textField>
                        <textField evaluationTime="Report" isBlankWhenNull="false">
                                <reportElement uuid="506b9991-ff6d-43b5-ab78-2832586c3dda" key="textField" x="502" y="0" width="52" height="15"/>
                                <textElement verticalAlignment="Middle">
                                        <font fontName="Arial" size="6" isBold="false"/>
                                </textElement>
                                <textFieldExpression><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>
                        </textField>
                </band>
        </pageFooter>
</jasperReport>