<?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="RelatorioEmpresaOnibus" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaOnibus" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="21"/>
	<parameter name="fecInicio" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="NOMBEMPRESA" class="java.lang.String"/>
	<parameter name="fecFinal" class="java.lang.String"/>
	<parameter name="USUARIO_ID" class="java.lang.String"/>
	<parameter name="LINHA_FILTRO" class="java.lang.String"/>
	<parameter name="SERVICO_FILTRO" class="java.lang.String"/>
	<parameter name="TITULO" class="java.lang.String"/>
	<queryString>
		<![CDATA[]]>
	</queryString>
	<field name="coche" class="java.lang.Integer"/>
	<field name="kmts" class="java.lang.Integer"/>
	<field name="empresa" class="java.lang.String"/>
	<variable name="sum.kmts" class="java.lang.Integer" resetType="Group" resetGroup="empresa" calculation="Sum">
		<variableExpression><![CDATA[$F{kmts}]]></variableExpression>
	</variable>
	<group name="empresa">
		<groupExpression><![CDATA[$F{empresa}]]></groupExpression>
		<groupHeader>
			<band height="69">
				<textField>
					<reportElement uuid="09306494-79f1-44dd-9eed-c39684384bbf" x="0" y="33" width="231" height="20"/>
					<textElement>
						<font size="12" isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="e8355048-a037-4837-866b-e6cf7a3e90ed" x="0" y="53" width="56" height="15"/>
					<textElement markup="none">
						<font size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$R{detail.coche}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement uuid="73c02335-4bbe-44ba-9c73-1201ed6b3967" x="56" y="53" width="60" height="15"/>
					<textElement markup="none">
						<font size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$R{detail.kmts}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement uuid="76104c33-e003-4a38-98bb-9db4d0f8636b" x="0" y="53" width="555" height="1"/>
				</line>
				<line>
					<reportElement uuid="97639de4-d619-4f05-9b3e-e615b643b778" x="0" y="68" width="555" height="1"/>
				</line>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="19">
				<textField isBlankWhenNull="true">
					<reportElement uuid="96095298-1c13-4089-8a8b-fd324b377e45" x="56" y="1" width="60" height="16"/>
					<textElement textAlignment="Right">
						<font size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$V{sum.kmts}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement uuid="1b8e90f1-09d3-4419-8d8b-a917b3b1f414" x="19" y="1" width="37" height="16"/>
					<textElement/>
					<text><![CDATA[Total]]></text>
				</staticText>
				<line>
					<reportElement uuid="6cef9de7-7dee-488b-aea7-3d02a8e3634a" x="0" y="0" width="555" height="1"/>
				</line>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="60" splitType="Stretch">
			<textField>
				<reportElement uuid="e5d4714c-07cc-42ff-a7a8-76d6f6d3e716" x="0" y="20" width="49" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.periodo}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60" x="401" y="0" width="56" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f" x="533" y="20" width="22" height="20"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="467" y="20" width="42" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="4914d9e7-6ce8-4512-b1f8-13f3b572ac50" x="49" y="20" width="182" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$P{fecInicio} + " à " + $P{fecFinal}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="652312bd-292a-424d-a234-5f157e3699c6" x="0" y="0" width="231" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH:mm">
				<reportElement uuid="6f671365-868e-41a6-81ee-a308d1d91e1d" x="457" y="0" width="98" height="20"/>
				<textElement textAlignment="Left"/>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="509" y="20" width="24" height="20"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="17" splitType="Stretch">
			<textField>
				<reportElement uuid="3343aea7-212b-4bd5-a29c-8dcab3cb7568" x="0" y="0" width="56" height="16"/>
				<textElement textAlignment="Left">
					<font size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{coche}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement uuid="4a68f71a-7be1-467a-b3eb-641a0c1f9a48" x="56" y="0" width="60" height="16"/>
				<textElement textAlignment="Right">
					<font size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{kmts}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<noData>
		<band height="20">
			<textField>
				<reportElement uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620" x="0" y="0" width="803" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
