<?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="RelatorioGratuidadeANTT" pageWidth="900" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="880" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
	<property name="ireport.zoom" value="1.0263162364614198"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
	<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
	<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
	<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
	<style name="Crosstab Data Text" hAlign="Center"/>
	<parameter name="USUARIO_ID" class="java.lang.String"/>
	<parameter name="linhas" class="java.lang.String"/>
	<parameter name="TITULO" class="java.lang.String"/>
	<parameter name="fecInicioVenda" class="java.lang.String"/>
	<parameter name="fecFinalVenda" class="java.lang.String"/>
	<parameter name="fecInicioViagem" class="java.lang.String"/>
	<parameter name="fecFinalViagem" class="java.lang.String"/>
	<parameter name="nomb_empresa" class="java.lang.String"/>
	<parameter name="tipGratu" class="java.lang.String"/>
	<queryString>
		<![CDATA[]]>
	</queryString>
	<field name="categoria" class="java.lang.String"/>
	<field name="codOrigem" class="java.lang.String"/>
	<field name="descOrigem" class="java.lang.String"/>
	<field name="codDestino" class="java.lang.String"/>
	<field name="descDestino" class="java.lang.String"/>
	<field name="dataViagem" class="java.lang.String"/>
	<field name="horaViagem" class="java.lang.String"/>
	<field name="poltrona" class="java.lang.String"/>
	<field name="passageiro" class="java.lang.String"/>
	<field name="doc1" class="java.lang.String"/>
	<field name="tipoDoc1" class="java.lang.String"/>
	<field name="tipoDoc2" class="java.lang.String"/>
	<field name="doc2" class="java.lang.String"/>
	<field name="linha" class="java.lang.String"/>
	<field name="descLinha" class="java.lang.String"/>
	<field name="valor" class="java.math.BigDecimal"/>
	<variable name="totCpf" class="java.math.BigDecimal" resetType="Group" resetGroup="cpf" calculation="Sum">
		<variableExpression><![CDATA[$F{valor}]]></variableExpression>
		<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
	</variable>
	<group name="cpf">
		<groupExpression><![CDATA[$F{doc2}]]></groupExpression>
		<groupFooter>
			<band height="25">
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
					<reportElement uuid="5adcedac-df72-4fc7-9b33-a977c9d13edf" stretchType="RelativeToTallestObject" x="737" y="0" width="142" height="16"/>
					<box rightPadding="1">
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.75"/>
					</box>
					<textElement textAlignment="Right"/>
					<textFieldExpression><![CDATA[$V{totCpf}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
					<reportElement uuid="3b448d67-68db-4ad5-bda4-1433eca9b2e1" stretchType="RelativeToTallestObject" x="573" y="0" width="164" height="16" isPrintWhenDetailOverflows="true"/>
					<box>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.75"/>
						<bottomPen lineWidth="0.75"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement textAlignment="Center"/>
					<textFieldExpression><![CDATA[$R{label.tot.cpf}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="117">
			<textField>
				<reportElement uuid="652312bd-292a-424d-a234-5f157e3699c6" x="0" y="0" width="671" height="37"/>
				<textElement>
					<font size="22" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60" x="671" y="0" width="106" height="37"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f" x="849" y="37" width="30" height="20"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="777" y="37" width="39" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH:mm">
				<reportElement uuid="6f671365-868e-41a6-81ee-a308d1d91e1d" x="777" y="0" width="102" height="37"/>
				<textElement textAlignment="Left"/>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="816" y="37" width="33" height="20"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27" x="0" y="37" width="82" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.periodo.venda}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335" x="82" y="37" width="695" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[( $P{fecInicioVenda} != null ? ($P{fecInicioVenda} + " à " + $P{fecFinalVenda}) :
  (
    $P{fecInicioViagem} != null ? ($P{fecInicioViagem} + " à " + $P{fecFinalViagem}) : ""
  )
)]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="31b4831f-a97b-44a1-a30f-ba93c667fa81" x="82" y="57" width="695" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$P{nomb_empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="2226c319-6b38-446a-ba1f-22821d110257" x="0" y="57" width="82" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="c9e03941-ee3e-48a7-89b1-8d54a16967b8" x="82" y="77" width="695" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$P{linhas}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="3ba8d3a4-fbf1-463f-adf1-84be528e61e1" x="0" y="77" width="82" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.filtro.linha}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="0c888f33-c387-443c-a975-c1b99e3a615e" x="82" y="97" width="695" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$P{tipGratu}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="fcf5c596-7687-4796-ba34-5d0d394733de" x="0" y="97" width="82" height="20" isRemoveLineWhenBlank="true"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.tipopassagem}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="16" splitType="Stretch">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="b9d87989-7174-4d57-87c8-260317d00817" stretchType="RelativeToTallestObject" x="0" y="0" width="155" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.passageiro}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="733d6335-4157-4f11-942c-ac07cb84e4ee" stretchType="RelativeToTallestObject" x="155" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.cpf}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="f4f48145-4703-4bf6-a515-303f003fed45" stretchType="RelativeToTallestObject" x="237" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.documento}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="55e35924-bdca-4847-9d65-70636e6764e0" stretchType="RelativeToTallestObject" x="319" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.data.viagem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="6842ca84-94d5-4647-a27d-67eb15769a30" stretchType="RelativeToTallestObject" x="401" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.hora.viagem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="ad5fa3ec-bf04-4f90-b1e2-e6286e996db5" stretchType="RelativeToTallestObject" x="483" y="0" width="90" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.linha}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="1ce96e1e-6a74-457f-a94e-f125e6789b5f" stretchType="RelativeToTallestObject" x="573" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.origen}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="10cfa628-fe54-4567-ba57-2dc770de4568" stretchType="RelativeToTallestObject" x="655" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="c5196bc2-ae4a-43e6-8d0a-7ae30f360cbc" stretchType="RelativeToTallestObject" x="737" y="0" width="60" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$R{label.poltrona}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="27d8de9b-3ef1-488e-b473-e91e5d261d92" stretchType="RelativeToTallestObject" x="797" y="0" width="82" height="16"/>
				<box rightPadding="1">
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$R{label.valor}]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="16" splitType="Prevent">
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement uuid="c07e35a0-e3b1-4fa1-aeff-a8a756c359ae" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="155" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{passageiro}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="789e30d0-e90e-402c-b21f-6ed3742dd9f3" stretchType="RelativeToTallestObject" x="737" y="0" width="60" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{poltrona}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement uuid="82cfcbd9-ad4a-47e8-a166-e0a48c207387" stretchType="RelativeToTallestObject" x="319" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{dataViagem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="605eb35e-1733-4007-a03a-fac5578a7348" stretchType="RelativeToTallestObject" x="655" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{descDestino}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="ba84d11d-f63a-4fa5-9ac2-46488f040cdd" stretchType="RelativeToTallestObject" x="483" y="0" width="90" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="05bc4824-542c-4ab7-90a7-f05559c0d840" stretchType="RelativeToTallestObject" x="155" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{doc2}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="7857f717-5cea-480f-9d45-b3c49cb365c3" stretchType="RelativeToTallestObject" x="573" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{descOrigem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="HH:mm" isBlankWhenNull="true">
				<reportElement uuid="ab7a3319-6e43-4ed9-bb0e-114f3d072da8" stretchType="RelativeToTallestObject" x="401" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{horaViagem}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="f9ded253-cf7f-4541-bf3e-ae74cc569a6e" stretchType="RelativeToTallestObject" x="237" y="0" width="82" height="16" isPrintWhenDetailOverflows="true"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center"/>
				<textFieldExpression><![CDATA[$F{doc1}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement uuid="d1e8c204-ecb6-405c-9dba-ffec205bfbf6" stretchType="RelativeToTallestObject" x="797" y="0" width="82" height="16"/>
				<box rightPadding="1">
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$F{valor}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band/>
	</summary>
	<noData>
		<band height="20">
			<textField>
				<reportElement uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620" x="0" y="0" width="1132" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
