git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@29102 d1611594-4594-4d17-8e1d-87c2c4800839
parent
f98ed9d7be
commit
d40f2535bc
Binary file not shown.
|
@ -0,0 +1,305 @@
|
||||||
|
<?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="RelatorioTrechoVendido" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="41ab2d20-dc50-4e37-b78d-20e600a984d4">
|
||||||
|
<property name="ireport.zoom" value="1.5"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="DATA_INICIO" class="java.util.Date"/>
|
||||||
|
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||||
|
<parameter name="PUNTOVENTA_ID" class="java.lang.Integer"/>
|
||||||
|
<parameter name="NOMBEMPRESA" class="java.lang.String">
|
||||||
|
<parameterDescription><![CDATA[]]></parameterDescription>
|
||||||
|
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||||
|
</parameter>
|
||||||
|
<parameter name="NOW" class="java.util.Date"/>
|
||||||
|
<parameter name="NOMBEMPRESA_SEARCH" class="java.lang.String"/>
|
||||||
|
<queryString>
|
||||||
|
<![CDATA[SELECT
|
||||||
|
origem.DESCPARADA AS ORIGEM,
|
||||||
|
destino.DESCPARADA AS DESTINO,
|
||||||
|
TO_CHAR(cor.FECHORSALIDA,'HH:MI') AS FECHORSALIDA,
|
||||||
|
e.NOMBEMPRESA AS NOMBEMPRESA,
|
||||||
|
SUM (c.PRECIOPAGADO) AS SOMA,
|
||||||
|
COUNT(
|
||||||
|
CASE
|
||||||
|
WHEN c.PRECIOPAGADO = 0
|
||||||
|
OR c.PRECIOPAGADO IS NULL
|
||||||
|
THEN 1
|
||||||
|
ELSE NULL
|
||||||
|
END) AS LIVRE,
|
||||||
|
COUNT(
|
||||||
|
CASE
|
||||||
|
WHEN c.PRECIOPAGADO <> 0
|
||||||
|
THEN 1
|
||||||
|
ELSE NULL
|
||||||
|
END) AS VENDA
|
||||||
|
FROM
|
||||||
|
CAJA c
|
||||||
|
LEFT JOIN PARADA origem
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.ORIGEN_ID = origem.PARADA_ID
|
||||||
|
)
|
||||||
|
LEFT JOIN PARADA destino
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.DESTINO_ID = destino.PARADA_ID
|
||||||
|
)
|
||||||
|
LEFT JOIN CORRIDA cor
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.CORRIDA_ID = cor.CORRIDA_ID
|
||||||
|
AND c.FECCORRIDA = cor.FECCORRIDA
|
||||||
|
)
|
||||||
|
LEFT JOIN EMPRESA e
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
e.EMPRESA_ID = c.EMPRESAPUNTOVENTA_ID
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
c.FECCORRIDA BETWEEN $P{DATA_INICIO} AND $P{DATA_FINAL}
|
||||||
|
AND c.PUNTOVENTA_ID = $P{PUNTOVENTA_ID}
|
||||||
|
AND e.NOMBEMPRESA LIKE $P{NOMBEMPRESA_SEARCH}
|
||||||
|
GROUP BY
|
||||||
|
origem.DESCPARADA ,
|
||||||
|
destino.DESCPARADA ,
|
||||||
|
TO_CHAR(cor.FECHORSALIDA,'HH:MI'),
|
||||||
|
e.NOMBEMPRESA
|
||||||
|
ORDER BY
|
||||||
|
origem.DESCPARADA,
|
||||||
|
destino.DESCPARADA,
|
||||||
|
TO_CHAR(cor.FECHORSALIDA,'HH:MI')]]>
|
||||||
|
</queryString>
|
||||||
|
<field name="ORIGEM" class="java.lang.String"/>
|
||||||
|
<field name="DESTINO" class="java.lang.String"/>
|
||||||
|
<field name="FECHORSALIDA" class="java.lang.String"/>
|
||||||
|
<field name="NOMBEMPRESA" class="java.lang.String"/>
|
||||||
|
<field name="SOMA" class="java.math.BigDecimal"/>
|
||||||
|
<field name="LIVRE" class="java.math.BigDecimal"/>
|
||||||
|
<field name="VENDA" class="java.math.BigDecimal"/>
|
||||||
|
<variable name="SOMA_TRECHO" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{SOMA}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="VENDA_1" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{VENDA}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="LIVRE_1" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{LIVRE}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="TOTAL_V_L" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[($V{VENDA_1}.add($V{LIVRE_1}))]]></variableExpression>
|
||||||
|
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||||
|
</variable>
|
||||||
|
<group name="ORIGEM_DESTINO">
|
||||||
|
<groupExpression><![CDATA[$F{ORIGEM} + $F{DESTINO}]]></groupExpression>
|
||||||
|
<groupHeader>
|
||||||
|
<band height="24">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="f69c0e2b-192d-4e29-89a2-cc946586e4fb" x="0" y="1" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{ORIGEM}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="998d3f53-5b81-431b-9b46-f06b3dc51ccc" x="153" y="2" width="128" height="19"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{DESTINO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e16f012b-fe60-44c1-a82d-a831a035b7b1" x="114" y="1" width="26" height="20"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.a}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="2722767b-42a9-43f4-8530-a3843acd50f5" x="0" y="20" width="551" height="1"/>
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="86c9cbad-4985-468c-94b3-df769598cbfc" x="0" y="0" width="551" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="179fee07-d42f-496e-b230-845f93d8c8f0" x="499" y="2" width="52" height="18"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_TRECHO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="a322f9ad-954c-465c-9b40-ac3cab4dc79b" x="344" y="2" width="18" height="18"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{VENDA_1}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="5d465455-d176-491c-85d6-32c9253ee154" x="400" y="0" width="15" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{LIVRE_1}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="01f963e8-3bec-4337-b9a5-b268e1a542e1" x="454" y="2" width="16" height="18"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{LIVRE_1}.add( $V{VENDA_1} )]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band/>
|
||||||
|
</groupFooter>
|
||||||
|
</group>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band height="1" splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="81" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ba15f24b-d005-454d-a657-77e4026eb86d" x="0" y="20" width="243" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.titulo.relatorio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="51c70ea8-b2da-4205-987b-440e2fd92472" x="0" y="40" width="57" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e937012b-ba35-4470-a65d-721239415cfb" x="0" y="60" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.filtro.agencia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="cb97e1df-8fd7-4be9-a133-3847faca4a55" x="0" y="0" width="243" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="12" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOMBEMPRESA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="82c899d6-0520-4713-87c1-9547f112e0a6" x="57" y="40" width="57" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{DATA_INICIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="96b616f7-e1b7-4d89-8f06-00a0cce0565a" x="85" y="60" width="15" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{PUNTOVENTA_ID}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0edcc027-d655-4f86-a3a4-7ef42dc76c79" x="114" y="40" width="13" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.a}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="845264f4-fe59-4244-9ba3-a379ed2554af" x="127" y="40" width="62" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="55501b9a-fd9a-463d-ae0d-cb8c15a6139f" x="534" y="20" width="17" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="8d99edae-4a10-4091-bb1a-bc5fc4ef1b78" x="495" y="20" width="39" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0f57ef57-d7b2-414c-84e5-73b8936474e3" x="411" y="0" width="55" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm">
|
||||||
|
<reportElement uuid="54dce584-fcac-4ea6-8c53-5fffbd0fc369" x="466" y="0" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOW}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="27c1f448-0728-42af-a89b-84443846c281" x="0" y="0" width="281" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.trecho}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="d86c76ce-f705-45e7-8cdb-a11b626bcb83" x="281" y="0" width="53" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.horario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="69a8660b-6a02-443a-bfd8-c04a1fdafe01" x="381" y="0" width="44" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.poltronas.livres}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="aa808a36-04ce-4f33-8cca-17782c004628" x="425" y="0" width="64" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="48b8257c-bf68-4b1e-9b6b-b51fecd0d6d0" x="499" y="0" width="52" height="20"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.valor.total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="889f0cb9-8418-42b0-83b8-a30794a7541f" x="334" y="0" width="47" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.venda}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="07c2d42d-0861-42f7-bda2-8157b5120f87" x="0" y="0" width="555" height="1"/>
|
||||||
|
</line>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="22" splitType="Stretch">
|
||||||
|
<textField pattern="HH:mm">
|
||||||
|
<reportElement uuid="3875c823-7570-4b5b-aaf1-98d6d68d268c" x="281" y="0" width="53" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{FECHORSALIDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b27e9c29-cf89-41db-a94b-799c969ef1e1" x="499" y="1" width="52" height="20"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{SOMA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="2b9b18b3-59d0-443c-9171-b5f43febb878" x="344" y="0" width="18" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{VENDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="5834225d-51b1-4929-b692-c9b61910587e" x="400" y="1" width="15" height="19"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{LIVRE}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e9915cd8-dd51-4e7b-8115-200c0222e843" x="454" y="1" width="16" height="19"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{VENDA}.add( $F{LIVRE} )]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="23">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="637f94f0-fe53-4a50-934e-58f2312a96a4" x="0" y="0" width="555" height="20"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
Loading…
Reference in New Issue