<?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="RelatorioVendasRequisicao" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<style name="Crosstab Data Text" hAlign="Center"/>
	<parameter name="fecInicio" class="java.lang.String"/>
	<parameter name="fecFinal" class="java.lang.String"/>
	<parameter name="noDataRelatorio" class="java.lang.String"/>
	<parameter name="empresa" class="java.lang.String"/>
	<parameter name="puntoventa" class="java.lang.String"/>
	<parameter name="CABECALHO_AGRUPAMENTO_LABEL" class="java.lang.String"/>
	<parameter name="CABECALHO_AGRUPAMENTO_DESCRICAO" class="java.lang.String"/>
	<parameter name="AGRUPAMENTO_LABEL" class="java.lang.String"/>
	<queryString>
		<![CDATA[]]>
	</queryString>
	<field name="nombpuntoventa" class="java.lang.String"/>
	<field name="nombempresa" class="java.lang.String"/>
	<field name="importe" class="java.math.BigDecimal"/>
	<field name="origem" class="java.lang.String"/>
	<field name="destino" class="java.lang.String"/>
	<field name="qtde" class="java.lang.Integer"/>
	<field name="origemId" class="java.lang.String"/>
	<field name="destinoId" class="java.lang.String"/>
	<field name="puntoventaId" class="java.lang.Integer"/>
	<field name="secretariaId" class="java.lang.Integer"/>
	<field name="descsecretaria" class="java.lang.String"/>
	<field name="numdocumento" class="java.lang.String"/>
	<field name="descricaogrupo" class="java.lang.String"/>
	<variable name="importe_1" class="java.math.BigDecimal" resetType="Group" resetGroup="secretariagroup" calculation="Sum">
		<variableExpression><![CDATA[$F{importe}]]></variableExpression>
	</variable>
	<variable name="qtde" class="java.lang.String"/>
	<variable name="qtde_1" class="java.lang.Integer" resetType="Group" resetGroup="secretariagroup" calculation="Sum">
		<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
	</variable>
	<variable name="qtdeTotal" class="java.lang.Integer" calculation="Sum">
		<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
	</variable>
	<variable name="importeTotal" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{importe}]]></variableExpression>
	</variable>
	<group name="secretariagroup">
		<groupExpression><![CDATA[$F{descricaogrupo}]]></groupExpression>
		<groupHeader>
			<band height="40">
				<staticText>
					<reportElement x="200" y="20" width="210" height="20" uuid="4ab9b047-7e05-40dd-a764-6d4c2f5a9387"/>
					<textElement>
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[Origem]]></text>
				</staticText>
				<textField>
					<reportElement x="0" y="0" width="802" height="20" uuid="8fc0dadc-9470-4614-9ed8-588df8f619a5"/>
					<textFieldExpression><![CDATA[$P{AGRUPAMENTO_LABEL} + ": " + $F{descricaogrupo}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="410" y="20" width="210" height="20" uuid="3a02ce7f-5b2e-415f-a9b9-d744f1c2d3aa"/>
					<textElement>
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[Destino]]></text>
				</staticText>
				<staticText>
					<reportElement x="702" y="20" width="100" height="20" uuid="8b2b4d01-a0ed-474d-a721-d2eabbcb5af7"/>
					<textElement textAlignment="Right">
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[Total]]></text>
				</staticText>
				<staticText>
					<reportElement x="620" y="20" width="82" height="20" uuid="86d422e2-4c74-4304-9275-43cf0b9c99bb"/>
					<textElement textAlignment="Right">
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[QTDE]]></text>
				</staticText>
				<staticText>
					<reportElement x="0" y="20" width="190" height="20" uuid="f7d62619-9506-4382-af1a-aad3081a2ba1"/>
					<textElement textAlignment="Right">
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[Req]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="21">
				<textField pattern="#,##0.00" isBlankWhenNull="true">
					<reportElement x="702" y="1" width="100" height="20" uuid="3a5276ac-d393-4a51-b60a-28f8105643d5"/>
					<textElement textAlignment="Right" verticalAlignment="Middle"/>
					<textFieldExpression><![CDATA[$V{importe_1}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="520" y="1" width="100" height="20" uuid="ab651bcd-8815-40b4-843d-3c675ae94009"/>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font isBold="true"/>
					</textElement>
					<text><![CDATA[Subtotal:]]></text>
				</staticText>
				<textField>
					<reportElement x="620" y="1" width="82" height="20" uuid="e1424ee9-fbe0-4d10-8153-ac0f5ff0a04b"/>
					<textElement textAlignment="Right" verticalAlignment="Middle"/>
					<textFieldExpression><![CDATA[$V{qtde_1}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement x="0" y="0" width="801" height="1" uuid="6789c052-c282-4536-8dc1-5a93c4d870f5"/>
				</line>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="78" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="620" height="20" uuid="43b2c28d-4760-4890-b00d-25e931e79c74"/>
				<textElement markup="none">
					<font size="14" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH:mm">
				<reportElement x="638" y="0" width="164" height="20" uuid="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="19" width="620" height="20" uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="53" y="38" width="748" height="20" uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a"/>
				<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="38" width="53" height="20" uuid="a91f6081-4740-4e36-8965-41b6cde4cc20"/>
				<text><![CDATA[Empresa:]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="57" width="790" height="20" uuid="53d53aa5-d8c9-43c6-b17d-1e6b49697237"/>
				<textFieldExpression><![CDATA[$P{CABECALHO_AGRUPAMENTO_LABEL} + ": " + $P{CABECALHO_AGRUPAMENTO_DESCRICAO}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="0" y="76" width="801" height="1" uuid="3a4eed21-70b4-44c0-8d34-8c53d44de3cf"/>
			</line>
		</band>
	</title>
	<pageHeader>
		<band height="21">
			<textField>
				<reportElement x="606" y="1" width="195" height="20" uuid="701a95fd-2c75-40c1-bb18-0e784375e289"/>
				<textElement textAlignment="Right">
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{cabecalho.pagina} + " " + $V{PAGE_NUMBER}+ " " + $R{cabecalho.de} + " " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<detail>
		<band height="20">
			<textField>
				<reportElement x="200" y="0" width="210" height="20" uuid="dcb220b3-2b02-4aa7-9e22-c458a53c7be6"/>
				<textFieldExpression><![CDATA[$F{origemId}+" - "+$F{origem}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="410" y="0" width="210" height="20" uuid="4f8b2848-6c67-468e-ae96-2a77fa2ffa1f"/>
				<textFieldExpression><![CDATA[$F{destinoId}+" - "+$F{destino}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement x="702" y="0" width="100" height="20" uuid="a373f36c-db6b-4e0f-8351-871d8533f8ec"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$F{importe}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="620" y="0" width="82" height="20" uuid="26fb8d06-0109-4496-8428-c300d86b9c74"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="0" width="190" height="20" uuid="f7684292-b49a-4dd3-91be-f216173bb2ef"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA[$F{numdocumento}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<summary>
		<band height="21">
			<textField>
				<reportElement x="620" y="1" width="82" height="20" uuid="05274e36-60ad-4390-9f27-3d06d96eb168"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{qtdeTotal}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="520" y="1" width="100" height="20" uuid="ba76f4f2-00f1-4bef-aeef-823589ad8b5b"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[TOTAL:]]></text>
			</staticText>
			<textField pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement x="702" y="1" width="100" height="20" uuid="36067a9c-e8b0-4f38-808a-0469b3a38d51"/>
				<textElement textAlignment="Right" verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{importeTotal}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="0" y="0" width="801" height="1" uuid="add1375c-df33-44b5-a5e7-fc894b024bc2"/>
			</line>
		</band>
	</summary>
	<noData>
		<band height="20">
			<textField isBlankWhenNull="true">
				<reportElement positionType="Float" x="0" y="0" width="555" height="20" isPrintWhenDetailOverflows="true" uuid="d7df66c6-4dc0-4f3b-88f4-b22094d29091"/>
				<textElement verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
