<?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="RelatorioPosicaoVendaBilheteIdosoPorTrecho" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7e37af0b-caa1-4f25-831c-5cbb2bb78560">
	<property name="ireport.zoom" value="1.2100000000000002"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="NOME_RELATORIO" class="java.lang.String"/>
	<parameter name="empresa" class="java.lang.String"/>
	<parameter name="linha" class="java.lang.String"/>
	<parameter name="tipoData" class="java.lang.String"/>
	<parameter name="periodo" class="java.lang.String"/>
	<parameter name="orgao" class="java.lang.String"/>
	<field name="origem" class="java.lang.String"/>
	<field name="destino" class="java.lang.String"/>
	<field name="qtde" class="java.lang.Integer"/>
	<field name="total" class="java.math.BigDecimal"/>
	<field name="facial" class="java.math.BigDecimal"/>
	<field name="descRuta" class="java.lang.String"/>
	<field name="descCategoria" class="java.lang.String"/>
	<variable name="somaTotal" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
		<variableExpression><![CDATA[$F{total}]]></variableExpression>
	</variable>
	<variable name="somaFacial" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
		<variableExpression><![CDATA[$F{facial}]]></variableExpression>
	</variable>
	<variable name="somaDiferenca" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
		<variableExpression><![CDATA[$F{facial}.subtract($F{total})]]></variableExpression>
	</variable>
	<variable name="somaQtde" class="java.lang.Integer" resetType="Group" resetGroup="ruta" calculation="Sum">
		<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
	</variable>
	<variable name="sumarioQtde" class="java.lang.Integer" calculation="Sum">
		<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
	</variable>
	<variable name="sumarioTotal" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{total}]]></variableExpression>
	</variable>
	<variable name="sumarioFacial" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{facial}]]></variableExpression>
	</variable>
	<variable name="sumarioDiferenca" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{facial}.subtract($F{total})]]></variableExpression>
	</variable>
	<group name="ruta">
		<groupExpression><![CDATA[$F{descRuta}]]></groupExpression>
		<groupHeader>
			<band height="42">
				<textField>
					<reportElement uuid="973583ee-63e4-4b32-a10e-b908debc4284" x="12" y="0" width="256" height="20"/>
					<textElement>
						<font isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{descRuta}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="ab86ac11-f143-40c3-8abf-f3666b2e7407" x="42" y="22" width="256" height="20"/>
					<textElement>
						<font isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{descCategoria}]]></textFieldExpression>
				</textField>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="25">
				<line>
					<reportElement uuid="6661d4ec-4f67-44b6-95de-e7245a0ef65e" x="0" y="2" width="553" height="1"/>
				</line>
				<textField>
					<reportElement uuid="02be5e12-1bf4-4ae7-be2b-7119cdb9d51f" x="200" y="3" width="58" height="20"/>
					<textElement/>
					<textFieldExpression><![CDATA[$V{somaQtde}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="2d4f29fa-4991-43e3-aa03-414d9dccc6c8" x="258" y="3" width="82" height="20"/>
					<textElement/>
					<textFieldExpression><![CDATA[$V{somaTotal}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="dbc6533a-e5b8-4244-be94-5088d27d92e4" x="343" y="3" width="100" height="20"/>
					<textElement/>
					<textFieldExpression><![CDATA[$V{somaFacial}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="f7f86ee7-8a55-4d16-9c13-66aef8d48781" x="443" y="3" width="100" height="20"/>
					<textElement/>
					<textFieldExpression><![CDATA[$V{somaDiferenca}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="141" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement uuid="e4d992c9-eb58-4b1e-878c-51ae5c729ab5" x="0" y="0" width="555" height="25"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="b6b378f0-944f-4749-9a9d-3e472361e7f7" x="0" y="39" width="100" height="20"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="8c699a77-f856-411f-9fac-501e7302c091" x="130" y="39" width="424" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="50284f0b-f675-46bb-8631-39946652702e" x="0" y="59" width="99" height="20"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.linhas}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="82bb8887-102e-4aac-a389-754fc985b623" x="130" y="59" width="424" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{linha}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="28aef032-0c0f-4e29-9f6a-5ae97f7be996" x="130" y="79" width="424" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{tipoData}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="acfcccfb-73e8-41a6-ac90-9aa1a86f6487" x="0" y="79" width="99" height="20"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.tipoData}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="9d5eb781-7cdf-4c6e-95a6-d16b53a2d20e" x="0" y="99" width="99" height="20"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="173b3e52-5b2e-4876-b40d-2774497dfbbe" x="130" y="99" width="424" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{periodo}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement uuid="ef42d3b8-d503-4309-a5ea-8f2b934d6ca9" x="0" y="139" width="554" height="1"/>
			</line>
			<textField isStretchWithOverflow="true">
				<reportElement uuid="de253e75-48e4-4e9b-9dc7-726cce57dc72" x="0" y="119" width="99" height="20"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.orgao}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="35a35927-834b-4e52-83f8-a7e344cc8ce2" x="130" y="119" width="424" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{orgao}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement uuid="7dfac679-5777-44d4-ad71-1d3f9a357d6c" x="0" y="0" width="100" height="20"/>
				<textElement>
					<font size="9"/>
				</textElement>
				<text><![CDATA[Origem]]></text>
			</staticText>
			<staticText>
				<reportElement uuid="97304743-de9a-4844-8e9d-379d072740cf" x="100" y="0" width="100" height="20"/>
				<textElement>
					<font size="9"/>
				</textElement>
				<text><![CDATA[Destino]]></text>
			</staticText>
			<staticText>
				<reportElement uuid="dc20ea31-05a2-45bb-a86b-f1baa2108a86" x="200" y="0" width="58" height="20"/>
				<textElement/>
				<text><![CDATA[Qtde]]></text>
			</staticText>
			<staticText>
				<reportElement uuid="f7ec78e7-a39e-4f02-94bf-12d765b24a30" x="258" y="0" width="85" height="20"/>
				<textElement/>
				<text><![CDATA[Total]]></text>
			</staticText>
			<staticText>
				<reportElement uuid="3ea87f7f-b79b-4061-be53-a080e107f592" x="343" y="0" width="100" height="20"/>
				<textElement/>
				<text><![CDATA[Facial]]></text>
			</staticText>
			<staticText>
				<reportElement uuid="740d5e49-4d40-40d7-9825-3947ca5e2b51" x="443" y="0" width="100" height="20"/>
				<textElement/>
				<text><![CDATA[Diferença]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement uuid="69fbf8f0-42ff-4ac1-b4c3-98cb8981756d" x="0" y="0" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement uuid="736fff80-1a77-49d3-ac6e-6db0455dea25" x="100" y="0" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="c3a4a33a-d87b-4b9d-8274-fefc39323c65" x="200" y="0" width="58" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="ca0e3ec0-0d1b-4825-a12e-d8afbc9e39f6" x="258" y="0" width="85" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="5b9f9b09-2c90-4830-b7f8-e9df269de6bc" x="343" y="0" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{facial}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="08f30945-be1b-47ce-9506-759fc931cc51" x="443" y="0" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{facial}.subtract($F{total})]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="25" splitType="Stretch">
			<line>
				<reportElement uuid="abcf5522-5645-4739-9010-bd4cee9be11b" x="0" y="2" width="553" height="1"/>
			</line>
			<staticText>
				<reportElement uuid="d2b97b16-c798-4ff5-b715-bfc2c4b13e70" x="99" y="3" width="100" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Total Geral:]]></text>
			</staticText>
			<textField>
				<reportElement uuid="89ae7594-cac1-4a05-b4c2-8a496928111b" x="200" y="3" width="58" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$V{sumarioQtde}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="1281f454-9b32-4db3-acc8-9c2734f0c988" x="258" y="3" width="85" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$V{sumarioTotal}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="ce657276-dd50-4d2b-a5d6-7a8c2dcb8f4b" x="343" y="3" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$V{sumarioFacial}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="5598f87e-a4b3-4fbb-9616-41c11699c424" x="443" y="3" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$V{sumarioDiferenca}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="50">
			<textField>
				<reportElement uuid="09b96c81-b864-4947-8a86-27e7e007139d" x="24" y="24" width="530" height="26"/>
				<textElement markup="none">
					<font size="11" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
