<?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="relDemandaDetalhado" pageWidth="1050" pageHeight="1190" whenNoDataType="BlankPage" columnWidth="990" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" uuid="3900e732-4867-442b-8d15-9592ee2f5370">
	<property name="ireport.scriptlethandling" value="0"/>
	<property name="ireport.encoding" value="UTF-8"/>
	<property name="ireport.zoom" value="1.1289478601075547"/>
	<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"/>
	<import value="net.sf.jasperreports.engine.*"/>
	<import value="java.util.*"/>
	<import value="net.sf.jasperreports.engine.data.*"/>
	<style name="Crosstab Data Text" hAlign="Center"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String">
		<defaultValueExpression><![CDATA["D:\\RJ Consultores\\SVN\\scheduler\\branches\\rjscheduler\\web\\relatorios\\jasperrelatorios\\"]]></defaultValueExpression>
	</parameter>
	<parameter name="FILTROS" class="java.lang.String"/>
	<field name="DATA" class="java.util.Date"/>
	<field name="SERVICO" class="java.math.BigDecimal"/>
	<field name="CLASSE" class="java.lang.String"/>
	<field name="LINHA" class="java.lang.String"/>
	<field name="CAPACIDADE" class="java.lang.Integer"/>
	<field name="OCUPACAO" class="java.lang.Integer"/>
	<field name="EMPRESA" class="java.lang.String"/>
	<field name="SENTIDO" class="java.lang.String"/>
	<field name="HORARIO" class="java.sql.Timestamp"/>
	<field name="CODLINHA" class="java.lang.String"/>
	<variable name="qtdTotal" class="java.lang.Integer" calculation="Sum">
		<variableExpression><![CDATA[$F{OCUPACAO}]]></variableExpression>
	</variable>
	<variable name="qtdCap" class="java.lang.Integer" calculation="Sum">
		<variableExpression><![CDATA[$F{CAPACIDADE}]]></variableExpression>
	</variable>
	<variable name="perOcupacao" class="java.lang.Double">
		<variableExpression><![CDATA[new java.lang.Double((($V{qtdTotal}.doubleValue())/($V{qtdCap}.doubleValue()))*100 )]]></variableExpression>
	</variable>
	<variable name="SRVIC_1" class="java.lang.Integer" calculation="Count">
		<variableExpression><![CDATA[$F{SERVICO}]]></variableExpression>
	</variable>
	<variable name="Info" class="java.lang.String">
		<variableExpression><![CDATA[$F{LINHA} +"  "+$F{SERVICO}.toString()+"  "+$F{CLASSE}+"  "+$F{OCUPACAO}.toString()]]></variableExpression>
	</variable>
	<variable name="Hora_Formatada" class="java.lang.String">
		<variableExpression><![CDATA[new java.text.SimpleDateFormat("HH:mm").format($F{HORARIO})]]></variableExpression>
	</variable>
	<group name="Linha">
		<groupExpression><![CDATA[$F{LINHA}]]></groupExpression>
		<groupHeader>
			<band splitType="Stretch"/>
		</groupHeader>
		<groupFooter>
			<band splitType="Stretch"/>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="25" splitType="Stretch">
			<staticText>
				<reportElement key="staticText-19" x="0" y="0" width="826" height="25" uuid="f81d2d9f-20d9-41f1-93a1-78cec7136628"/>
				<textElement textAlignment="Left" verticalAlignment="Top">
					<font fontName="SansSerif" size="14" isBold="true" pdfFontName="Helvetica-Bold"/>
				</textElement>
				<text><![CDATA[CONSULTA ESTATÍSTICA OPERACIONAL DE OCUPAÇÃO POR HORÁRIO
]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy HH:mm">
				<reportElement x="826" y="0" width="164" height="25" uuid="49885dbe-d70d-443f-aeb2-e9eb1f7450e8"/>
				<textElement textAlignment="Right" verticalAlignment="Top">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band height="38">
			<textField isBlankWhenNull="true">
				<reportElement key="staticText-2" x="0" y="0" width="51" height="17" isRemoveLineWhenBlank="true" uuid="3b7952bc-5074-43c2-be82-cc71105d07f4"/>
				<textElement textAlignment="Left" verticalAlignment="Middle" markup="none">
					<font fontName="SansSerif" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{FILTROS} !=null? "Filtro:": null]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement key="textField" stretchType="RelativeToTallestObject" x="51" y="0" width="939" height="17" isRemoveLineWhenBlank="true" uuid="3048ec49-fbd5-45f9-aa4a-94b1e0e64788"/>
				<textElement textAlignment="Left" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="17" width="936" height="20" uuid="b9c78c88-4c19-428a-a305-466cc73982cf"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$R{cabecalho.pagina}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="966" y="17" width="22" height="20" uuid="f8fe3ccd-41fb-4c10-b2c7-203b993f92a3"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="936" y="17" width="30" height="20" uuid="998850e4-c438-4f0f-a231-149a7be5f2ee"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band splitType="Stretch"/>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band/>
	</pageFooter>
	<lastPageFooter>
		<band/>
	</lastPageFooter>
	<summary>
		<band height="46" splitType="Stretch">
			<crosstab>
				<reportElement key="crosstab-1" x="0" y="1" width="990" height="45" uuid="4e29f55b-efd7-426e-886e-71b572566c93"/>
				<box>
					<pen lineWidth="0.25"/>
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<crosstabHeaderCell>
					<cellContents mode="Transparent">
						<staticText>
							<reportElement key="staticText-31" x="46" y="0" width="261" height="25" uuid="d13d0121-bc65-41a0-9cf5-37372540ecbd"/>
							<box>
								<rightPen lineWidth="0.25"/>
							</box>
							<textElement textAlignment="Left" verticalAlignment="Middle">
								<font size="10" isBold="true" isStrikeThrough="false"/>
							</textElement>
							<text><![CDATA[Descrição]]></text>
						</staticText>
						<staticText>
							<reportElement key="staticText-31" x="307" y="0" width="35" height="25" uuid="3423e6cc-3e0f-48a8-a6d5-40a11685a060"/>
							<box>
								<rightPen lineWidth="0.0"/>
							</box>
							<textElement textAlignment="Center" verticalAlignment="Middle">
								<font size="10" isBold="true" isStrikeThrough="false"/>
							</textElement>
							<text><![CDATA[Oferta]]></text>
						</staticText>
						<staticText>
							<reportElement key="staticText-31" x="1" y="0" width="45" height="25" uuid="31a9dadd-5511-4d75-851d-e9b3a02a4543"/>
							<box>
								<pen lineWidth="0.0"/>
								<topPen lineWidth="0.0"/>
								<leftPen lineWidth="0.0"/>
								<bottomPen lineWidth="0.0"/>
								<rightPen lineWidth="0.0"/>
							</box>
							<textElement textAlignment="Left" verticalAlignment="Middle">
								<font size="10" isBold="true" isStrikeThrough="false"/>
							</textElement>
							<text><![CDATA[Linha]]></text>
						</staticText>
					</cellContents>
				</crosstabHeaderCell>
				<rowGroup name="CODLINHA" width="46">
					<bucket class="java.lang.String">
						<bucketExpression><![CDATA[$F{CODLINHA}.trim()]]></bucketExpression>
					</bucket>
					<crosstabRowHeader>
						<cellContents>
							<textField isStretchWithOverflow="true" isBlankWhenNull="true">
								<reportElement key="textField" stretchType="RelativeToTallestObject" x="1" y="0" width="45" height="20" uuid="05bed0e7-cce8-48e7-9c7f-a6b8d8b38476"/>
								<box>
									<pen lineWidth="0.0" lineStyle="Solid"/>
									<topPen lineWidth="0.0" lineStyle="Solid"/>
									<leftPen lineWidth="0.0" lineStyle="Solid"/>
									<bottomPen lineWidth="0.0" lineStyle="Solid"/>
									<rightPen lineWidth="0.0" lineStyle="Solid"/>
								</box>
								<textElement textAlignment="Left" verticalAlignment="Top"/>
								<textFieldExpression><![CDATA[$V{CODLINHA}]]></textFieldExpression>
							</textField>
						</cellContents>
					</crosstabRowHeader>
					<crosstabTotalRowHeader>
						<cellContents/>
					</crosstabTotalRowHeader>
				</rowGroup>
				<rowGroup name="LINHA" width="296">
					<bucket class="java.lang.String">
						<bucketExpression><![CDATA[$F{LINHA}.trim()]]></bucketExpression>
					</bucket>
					<crosstabRowHeader>
						<cellContents mode="Transparent">
							<box>
								<rightPen lineWidth="0.0"/>
							</box>
							<textField isStretchWithOverflow="true" isBlankWhenNull="true">
								<reportElement key="textField" stretchType="RelativeToTallestObject" x="0" y="0" width="261" height="20" uuid="34c3563b-2412-4f4f-9b90-709810f3f8e5"/>
								<box>
									<rightPen lineWidth="0.25"/>
								</box>
								<textElement textAlignment="Left" verticalAlignment="Top"/>
								<textFieldExpression><![CDATA[$V{LINHA}.trim()]]></textFieldExpression>
							</textField>
							<textField isStretchWithOverflow="true" isBlankWhenNull="true">
								<reportElement key="textField" stretchType="RelativeToTallestObject" x="261" y="0" width="35" height="20" uuid="546a95bf-7c1c-45c9-b3df-7ad571e0988f"/>
								<textElement textAlignment="Center" verticalAlignment="Top"/>
								<textFieldExpression><![CDATA[$V{OFERTA}]]></textFieldExpression>
							</textField>
						</cellContents>
					</crosstabRowHeader>
					<crosstabTotalRowHeader>
						<cellContents/>
					</crosstabTotalRowHeader>
				</rowGroup>
				<columnGroup name="DATA" height="25" totalPosition="End" headerPosition="Center">
					<bucket class="java.util.Date">
						<bucketExpression><![CDATA[$F{DATA}]]></bucketExpression>
					</bucket>
					<crosstabColumnHeader>
						<cellContents mode="Transparent">
							<box>
								<leftPen lineWidth="0.0"/>
							</box>
							<textField pattern="dd" isBlankWhenNull="false">
								<reportElement key="textField" x="0" y="0" width="20" height="25" uuid="d34310ec-fa5c-4695-8cc4-f47131d55112"/>
								<textElement textAlignment="Center" verticalAlignment="Middle">
									<font isBold="true" isStrikeThrough="false"/>
								</textElement>
								<textFieldExpression><![CDATA[$V{DATA}]]></textFieldExpression>
							</textField>
						</cellContents>
					</crosstabColumnHeader>
					<crosstabTotalColumnHeader>
						<cellContents>
							<staticText>
								<reportElement key="staticText-31" mode="Opaque" x="0" y="0" width="28" height="25" backcolor="#BFE1FF" uuid="807fc415-9635-4cd6-9f27-92600b84e56e"/>
								<box>
									<rightPen lineWidth="0.0"/>
								</box>
								<textElement textAlignment="Center" verticalAlignment="Middle">
									<font isBold="true" isStrikeThrough="false"/>
								</textElement>
								<text><![CDATA[Total]]></text>
							</staticText>
						</cellContents>
					</crosstabTotalColumnHeader>
				</columnGroup>
				<measure name="QUANTIDADE_Nothing" class="java.lang.Integer">
					<measureExpression><![CDATA[$F{OCUPACAO}]]></measureExpression>
				</measure>
				<measure name="QTD_SOMA" class="java.lang.Integer" calculation="Sum">
					<measureExpression><![CDATA[$F{OCUPACAO}]]></measureExpression>
				</measure>
				<measure name="OFERTA" class="java.lang.Integer">
					<measureExpression><![CDATA[$F{CAPACIDADE}]]></measureExpression>
				</measure>
				<crosstabCell width="20" height="20">
					<cellContents mode="Transparent">
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement key="textField" stretchType="RelativeToTallestObject" x="0" y="0" width="20" height="20" uuid="74209276-598d-43e7-90fb-98a469085868"/>
							<textElement textAlignment="Center" verticalAlignment="Top"/>
							<textFieldExpression><![CDATA[$V{QUANTIDADE_Nothing}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
				<crosstabCell width="28" height="20" columnTotalGroup="DATA">
					<cellContents backcolor="#009999" mode="Transparent">
						<box>
							<pen lineWidth="0.0" lineStyle="Dashed"/>
							<topPen lineWidth="0.0" lineStyle="Dashed"/>
							<leftPen lineWidth="0.0" lineStyle="Dashed"/>
							<bottomPen lineWidth="0.0" lineStyle="Dashed"/>
							<rightPen lineWidth="0.0" lineStyle="Dashed"/>
						</box>
						<textField isStretchWithOverflow="true" isBlankWhenNull="true">
							<reportElement key="textField" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="28" height="20" backcolor="#BFE1FF" uuid="77d3247c-6b14-4ae9-83b1-eba8ca108c14"/>
							<textElement textAlignment="Center" verticalAlignment="Top"/>
							<textFieldExpression><![CDATA[$V{QTD_SOMA}]]></textFieldExpression>
						</textField>
					</cellContents>
				</crosstabCell>
				<crosstabCell width="20" height="0" rowTotalGroup="LINHA">
					<cellContents mode="Transparent"/>
				</crosstabCell>
				<crosstabCell width="0" height="0" rowTotalGroup="LINHA" columnTotalGroup="DATA">
					<cellContents mode="Transparent"/>
				</crosstabCell>
				<crosstabCell rowTotalGroup="CODLINHA">
					<cellContents/>
				</crosstabCell>
				<crosstabCell rowTotalGroup="CODLINHA" columnTotalGroup="DATA">
					<cellContents/>
				</crosstabCell>
				<whenNoDataCell>
					<cellContents mode="Transparent"/>
				</whenNoDataCell>
			</crosstab>
			<line>
				<reportElement key="line-4" x="0" y="0" width="990" height="1" uuid="6a58b643-d1f0-40ab-a849-1486c711f59f"/>
			</line>
		</band>
	</summary>
	<noData>
		<band height="97" splitType="Stretch">
			<textField isBlankWhenNull="false">
				<reportElement key="textField" x="787" y="51" width="86" height="18" uuid="25509d35-18f5-43bf-b9d9-c55e3e14dd9c"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{qtdTotal}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement key="staticText-26" x="668" y="30" width="114" height="18" uuid="5a637021-68e1-41a1-bc10-3364946080d5"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<text><![CDATA[Capacidade Total:]]></text>
			</staticText>
			<staticText>
				<reportElement key="staticText-27" x="668" y="52" width="114" height="16" uuid="ff2d518c-9106-4669-8cb1-84b757035a86"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<text><![CDATA[Ocupação Total:]]></text>
			</staticText>
			<textField isBlankWhenNull="false">
				<reportElement key="textField" x="787" y="30" width="86" height="18" uuid="b5f80f2f-73f7-4b2e-86af-5b4d3a618f4a"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{qtdCap}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement key="staticText-28" x="651" y="4" width="131" height="21" uuid="c7361dc2-2199-4e82-a1bb-a72a10abed7b"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<text><![CDATA[Quantidade de Serviços:]]></text>
			</staticText>
			<staticText>
				<reportElement key="staticText-29" x="668" y="73" width="114" height="19" uuid="f5839ae9-ac79-4529-acb1-5570340d3b9a"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<text><![CDATA[% Ocupação:]]></text>
			</staticText>
			<textField pattern="##0.00" isBlankWhenNull="false">
				<reportElement key="textField" x="787" y="73" width="76" height="18" uuid="7175ab3f-bdec-4e74-a7f5-fdc89efc8970"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{perOcupacao}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement key="staticText-30" x="863" y="73" width="9" height="18" uuid="90be7b84-937a-4379-a2cc-0c7575bbbf49"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font fontName="Arial"/>
				</textElement>
				<text><![CDATA[%]]></text>
			</staticText>
			<textField isBlankWhenNull="false">
				<reportElement key="textField" x="787" y="4" width="85" height="21" uuid="710fb129-63a4-473f-bac8-b5ba6c4dcfde"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{SRVIC_1}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
