<?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.36602691073015"/>
	<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="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="totIda" class="java.lang.Integer"/>
	<field name="totVolta" class="java.lang.Integer"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="117">
			<textField>
				<reportElement x="0" y="0" width="633" height="37" uuid="652312bd-292a-424d-a234-5f157e3699c6"/>
				<textElement>
					<font size="22" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="633" y="0" width="106" height="37" uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60"/>
				<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="811" y="37" width="30" height="20" uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="739" y="37" width="39" height="20" uuid="be1692e9-f130-4d08-9173-6ca3e4699030"/>
				<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH:mm">
				<reportElement x="739" y="0" width="102" height="37" uuid="6f671365-868e-41a6-81ee-a308d1d91e1d"/>
				<textElement textAlignment="Left"/>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="778" y="37" width="33" height="20" uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="37" width="82" height="20" uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27"/>
				<textFieldExpression><![CDATA[$R{header.periodo.venda}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="82" y="37" width="657" height="20" uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335"/>
				<textFieldExpression><![CDATA[( $P{fecInicioVenda} != null ? ($P{fecInicioVenda} + " à " + $P{fecFinalVenda}) : "" )]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="82" y="57" width="657" height="20" isRemoveLineWhenBlank="true" uuid="31b4831f-a97b-44a1-a30f-ba93c667fa81"/>
				<textFieldExpression><![CDATA[$P{nomb_empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="57" width="82" height="20" isRemoveLineWhenBlank="true" uuid="2226c319-6b38-446a-ba1f-22821d110257"/>
				<textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="82" y="77" width="657" height="20" isRemoveLineWhenBlank="true" uuid="c9e03941-ee3e-48a7-89b1-8d54a16967b8"/>
				<textFieldExpression><![CDATA[$P{linhas}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="77" width="82" height="20" isRemoveLineWhenBlank="true" uuid="3ba8d3a4-fbf1-463f-adf1-84be528e61e1"/>
				<textFieldExpression><![CDATA[$R{header.filtro.linha}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="82" y="97" width="657" height="20" isRemoveLineWhenBlank="true" uuid="0c888f33-c387-443c-a975-c1b99e3a615e"/>
				<textFieldExpression><![CDATA[$P{tipGratu}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="97" width="82" height="20" isRemoveLineWhenBlank="true" uuid="fcf5c596-7687-4796-ba34-5d0d394733de"/>
				<textFieldExpression><![CDATA[$R{detail.tipopassagem}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band splitType="Prevent"/>
	</detail>
	<summary>
		<band height="50">
			<crosstab isRepeatColumnHeaders="false" isRepeatRowHeaders="false">
				<reportElement x="0" y="0" width="880" height="50" uuid="1f05be3b-eaa6-4929-8de0-c3fa6690b40a"/>
				<crosstabHeaderCell>
					<cellContents backcolor="#F0F8FF" mode="Opaque" style="Crosstab Data Text">
						<box>
							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
						</box>
						<staticText>
							<reportElement style="Crosstab Data Text" x="0" y="19" width="300" height="21" uuid="088e3795-1eb7-481e-8c32-1e26473f927b"/>
							<textElement verticalAlignment="Middle"/>
							<text><![CDATA[Trecho]]></text>
						</staticText>
					</cellContents>
				</crosstabHeaderCell>
				<rowGroup name="codOrigem" width="300" totalPosition="End">
					<bucket class="java.lang.String">
						<bucketExpression><![CDATA[$F{codOrigem}+" - "+
$F{descOrigem}+" / "+
$F{codDestino}+" - "+
$F{descDestino}]]></bucketExpression>
					</bucket>
					<crosstabRowHeader>
						<cellContents mode="Transparent">
							<box>
								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
							</box>
							<textField isStretchWithOverflow="true" isBlankWhenNull="true">
								<reportElement style="Crosstab Data Text" x="0" y="0" width="300" height="20" isPrintWhenDetailOverflows="true" uuid="d2da87fe-b9bd-4cc0-96df-4971d31fb5de"/>
								<textElement textAlignment="Left"/>
								<textFieldExpression><![CDATA[$V{codOrigem}]]></textFieldExpression>
							</textField>
						</cellContents>
					</crosstabRowHeader>
					<crosstabTotalRowHeader>
						<cellContents backcolor="#BFE1FF" mode="Opaque">
							<box>
								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
							</box>
							<staticText>
								<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="300" height="20" isPrintWhenDetailOverflows="true" uuid="ef03becf-8b80-4531-9123-fc28791d591a"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Total ]]></text>
							</staticText>
						</cellContents>
					</crosstabTotalRowHeader>
				</rowGroup>
				<columnGroup name="categoria" height="40">
					<bucket class="java.lang.String">
						<bucketExpression><![CDATA[$F{categoria}]]></bucketExpression>
					</bucket>
					<crosstabColumnHeader>
						<cellContents backcolor="#F0F8FF" mode="Opaque">
							<box>
								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
							</box>
							<textField isStretchWithOverflow="true" isBlankWhenNull="true">
								<reportElement style="Crosstab Data Text" isPrintRepeatedValues="false" x="0" y="0" width="70" height="20" uuid="9bb7d614-7ff3-44bf-8fd0-b2b8273b5d7b"/>
								<box>
									<bottomPen lineWidth="0.25"/>
								</box>
								<textFieldExpression><![CDATA[$V{categoria}]]></textFieldExpression>
							</textField>
							<staticText>
								<reportElement style="Crosstab Data Text" x="35" y="20" width="35" height="20" uuid="1d7462ff-2d63-472b-a4e0-36b596f34758"/>
								<text><![CDATA[Volta]]></text>
							</staticText>
							<staticText>
								<reportElement style="Crosstab Data Text" x="0" y="20" width="35" height="20" uuid="d36e7329-1b17-4d32-999f-e62890d70493"/>
								<box>
									<rightPen lineWidth="0.25"/>
								</box>
								<text><![CDATA[Ida]]></text>
							</staticText>
						</cellContents>
					</crosstabColumnHeader>
					<crosstabTotalColumnHeader>
						<cellContents/>
					</crosstabTotalColumnHeader>
				</columnGroup>
				<measure name="totIdaMeasure" class="java.lang.Integer" calculation="Sum">
					<measureExpression><![CDATA[$F{totIda}]]></measureExpression>
				</measure>
				<measure name="totVoltMeasure" class="java.lang.Integer" calculation="Sum">
					<measureExpression><![CDATA[$F{totVolta}]]></measureExpression>
				</measure>
				<crosstabCell width="70" height="20">
					<cellContents>
						<box>
							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
						</box>
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement style="Crosstab Data Text" x="0" y="0" width="35" height="20" uuid="235235ea-c21b-4204-9778-2d0fcd9280da"/>
							<box rightPadding="0">
								<rightPen lineWidth="0.25"/>
							</box>
							<textElement>
								<font size="10"/>
							</textElement>
							<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
						</textField>
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement style="Crosstab Data Text" x="35" y="0" width="35" height="20" uuid="bf83c563-53ee-4534-bddc-bffd977bfe2a"/>
							<textElement>
								<font size="10"/>
							</textElement>
							<textFieldExpression><![CDATA[$V{totVoltMeasure}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
				<crosstabCell width="70" height="21" rowTotalGroup="codOrigem">
					<cellContents backcolor="#BFE1FF" mode="Opaque">
						<box>
							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
						</box>
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement style="Crosstab Data Text" x="0" y="0" width="35" height="20" uuid="deaa8760-3743-4d0e-a70f-8f0501631b44"/>
							<box>
								<rightPen lineWidth="0.25"/>
							</box>
							<textElement>
								<font size="10"/>
							</textElement>
							<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
						</textField>
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement style="Crosstab Data Text" x="35" y="0" width="35" height="20" uuid="2bc9637c-112a-48e9-a5ec-ddd03557b453"/>
							<textElement>
								<font size="10"/>
							</textElement>
							<textFieldExpression><![CDATA[$V{totVoltMeasure}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
				<crosstabCell width="50" columnTotalGroup="categoria">
					<cellContents backcolor="#BFE1FF" mode="Opaque">
						<box>
							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
						</box>
						<textField>
							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="e2b2840a-3599-4818-b1d0-30746a7710b9"/>
							<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
				<crosstabCell rowTotalGroup="codOrigem" columnTotalGroup="categoria">
					<cellContents backcolor="#BFE1FF" mode="Opaque">
						<box>
							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
						</box>
						<textField>
							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="5af91289-3712-42e1-ad34-720e7b396d76"/>
							<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
			</crosstab>
		</band>
	</summary>
	<noData>
		<band height="25">
			<textField>
				<reportElement x="0" y="0" width="1132" height="20" uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620"/>
				<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
