<?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="th_lista_cliente_analitico" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="814" leftMargin="14" rightMargin="14" topMargin="14" bottomMargin="14" uuid="e7910379-b296-485c-a885-202b65718627">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<style name="Linhas-Zebra" backcolor="#F5F7FA" hAlign="Left" vAlign="Middle" isBlankWhenNull="true" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
			<topPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<leftPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<bottomPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<rightPen lineWidth="0.5" lineColor="#D4D7DD"/>
		</box>
		<conditionalStyle>
			<conditionExpression><![CDATA[new Boolean( $V{REPORT_COUNT}.intValue() % 2 == 0)]]></conditionExpression>
			<style mode="Opaque" backcolor="#F3F5FA"/>
		</conditionalStyle>
	</style>
	<style name="Título" hAlign="Left" vAlign="Middle" isBlankWhenNull="true" fontSize="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="1" bottomPadding="1"/>
	</style>
	<style name="Filtros" hAlign="Left" vAlign="Middle" isBlankWhenNull="false" fontSize="7" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false">
		<box topPadding="2" bottomPadding="5">
			<bottomPen lineWidth="0.75"/>
		</box>
	</style>
	<style name="Data/Hora" hAlign="Right" vAlign="Middle" isBlankWhenNull="false" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="1" bottomPadding="1">
			<bottomPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="Apr-Clean" fill="Solid" hAlign="Center" vAlign="Middle" markup="none" isBlankWhenNull="true" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
			<pen lineWidth="0.0"/>
			<topPen lineWidth="0.5" lineColor="#000000"/>
			<leftPen lineWidth="0.0" lineStyle="Dashed"/>
			<bottomPen lineWidth="0.5" lineColor="#000000"/>
			<rightPen lineWidth="0.0" lineStyle="Dashed"/>
		</box>
	</style>
	<style name="Apr-Duplo" fill="Solid" hAlign="Center" vAlign="Middle" markup="none" isBlankWhenNull="true" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
			<pen lineWidth="0.0"/>
			<topPen lineWidth="0.5" lineColor="#000000"/>
			<leftPen lineWidth="0.5" lineColor="#000000"/>
			<bottomPen lineWidth="0.5" lineColor="#000000"/>
			<rightPen lineWidth="0.5" lineColor="#000000"/>
		</box>
	</style>
	<style name="Grupo1" hAlign="Left" vAlign="Middle" isBlankWhenNull="true" fontSize="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="9" bottomPadding="3"/>
	</style>
	<style name="Totalizador" hAlign="Left" vAlign="Middle" isBlankWhenNull="false" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
			<pen lineWidth="0.5"/>
			<topPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<leftPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<bottomPen lineWidth="0.5" lineColor="#D4D7DD"/>
			<rightPen lineWidth="0.5" lineColor="#D4D7DD"/>
		</box>
	</style>
	<style name="Versão" hAlign="Left" vAlign="Middle" isBlankWhenNull="false" fontSize="7" isBold="true" isItalic="true" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false">
		<box topPadding="0" bottomPadding="1">
			<pen lineWidth="0.0"/>
			<topPen lineWidth="0.75" lineColor="#000000"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="0.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<parameter name="P_USU" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_ORDEM" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_CLI" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_RCA" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_MUN" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_UF" class="java.lang.String">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_ROTA" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_LOC" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_AGRUP" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_CLIBLOQ" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_GRUPOCLI" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_AV" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_RA" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_FORN" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_PRO" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCOMPDE" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCOMP" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCOMPATE" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCADDE" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCADATE" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="P_DTCAD" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[
SELECT

/*****************************************
CABECALHO/RODAPE
*****************************************/

'Lista de Clientes Analítico' AS relatorio,

to_char(now(),'dd/mm/yyyy HH24:MI') || ' (' ||
coalesce(
    (SELECT usulogin
     FROM usu
     WHERE usufunparcod = $P{P_USU}),
    '...'
) || ')' AS dtimpr,

'th_lista_cliente_analitico v26.11.06 - www.brsistemas.com.br' AS versao,

/*****************************************
DADOS DO CLIENTE
*****************************************/

par.parcod,
par.pardes,
par.parfan,
par.parrua,
par.parbai,
par.parcep,
par.parcnpjcpf,
par.pardddfone || '-' || par.parfone AS parfone,

mun.mundes,
mun.munufsigla,
loc.locdes,
ra.rades,

cli.clircaparcod,

CASE
    WHEN cli.clibloq = 'S' THEN 'Sim'
    ELSE 'Não'
END AS clibloq,

cli.clibloqobs,
cli.clilim,

compra.vlcompra,
qtpedido.qtpedido,
ultimacompra.dtultimacompra,
ultimacompra.vlultimacompra

FROM cli

JOIN par
    ON cli.cliparcod = par.parcod

LEFT JOIN mun
    ON par.parmuncod = mun.muncod

LEFT JOIN loc
    ON cli.cliloccod = loc.loccod

LEFT JOIN ra
    ON cli.cliracod = ra.racod

JOIN rota clirota
    ON loc.locrotacod = clirota.rotacod


/*****************************************
TOTAL DE COMPRAS DO CLIENTE
*****************************************/

LEFT JOIN (
    SELECT
        fat_par_cod,
        SUM(fat_vl) AS vlcompra
    FROM sd.vw_fat
    WHERE fat_opnftipo_cod IN ('VE','VV','VI')
    GROUP BY fat_par_cod
) AS compra
    ON compra.fat_par_cod = par.parcod


/*****************************************
ULTIMA COMPRA DO CLIENTE
RETORNA NO MAXIMO UM REGISTRO
*****************************************/

LEFT JOIN (
    SELECT DISTINCT ON (f.fat_par_cod)
        f.fat_par_cod AS clicod,
        f.fat_nf_dtemi AS dtultimacompra,
        f.fat_vl AS vlultimacompra
    FROM sd.vw_fat f
    JOIN cli c
        ON c.cliparcod = f.fat_par_cod
       AND c.cliducomp = f.fat_nf_dtemi
    WHERE f.fat_opnftipo_cod IN ('VE','VV','VI')
      AND (
          $P{P_FORN} = 0
          OR f.fat_forn_cod = $P{P_FORN}
      )
      AND (
          $P{P_PRO} = 0
          OR f.fat_pro_cod = $P{P_PRO}
      )
    ORDER BY
        f.fat_par_cod,
        f.fat_nf_cod DESC,
        f.fat_vl DESC
) AS ultimacompra
    ON ultimacompra.clicod = par.parcod


/*****************************************
QUANTIDADE DE PEDIDOS
*****************************************/

LEFT JOIN (
    SELECT
        pvcliparcod,
        COUNT(pvcod) AS qtpedido
    FROM pv
    GROUP BY pvcliparcod
) AS qtpedido
    ON qtpedido.pvcliparcod = par.parcod


/*****************************************
FILTROS
*****************************************/

WHERE 1=1

-- DATA DE CADASTRO
AND (
    $P{P_DTCAD} = 'S'
    OR DATE(cli.cli_dt_cad)
       BETWEEN CAST($P{P_DTCADDE} AS DATE)
           AND CAST($P{P_DTCADATE} AS DATE)
)

-- DATA DA ULTIMA COMPRA
AND (
    $P{P_DTCOMP} = 'S'
    OR DATE(ultimacompra.dtultimacompra)
       BETWEEN CAST($P{P_DTCOMPDE} AS DATE)
           AND CAST($P{P_DTCOMPATE} AS DATE)
)

-- FORNECEDOR E PRODUTO
AND (
    ($P{P_FORN} = 0 AND $P{P_PRO} = 0)
    OR ultimacompra.dtultimacompra IS NOT NULL
)

-- RCA / VENDEDOR
AND (
    $P{P_RCA} = 0
    OR EXISTS (
        SELECT 1
        FROM clirca
        WHERE clirca.clircacliparcod = par.parcod
          AND clirca.clircarcaparcod = $P{P_RCA}
    )
)

-- MUNICIPIO
AND (
    $P{P_MUN} = 0
    OR mun.muncod = $P{P_MUN}
)

-- UF
AND (
    $P{P_UF} = '0'
    OR mun.munufsigla = $P{P_UF}
)

-- ROTA
AND (
    $P{P_ROTA} = 0
    OR clirota.rotacod = $P{P_ROTA}
)

-- LOCALIDADE
AND (
    $P{P_LOC} = 0
    OR loc.loccod = $P{P_LOC}
)

-- RAMO DE ATIVIDADE
AND (
    $P{P_RA} = 0
    OR cli.cliracod = $P{P_RA}
)

-- AREA DE VENDA
AND (
    $P{P_AV} = 0
    OR cli.cli_av_codigo = $P{P_AV}
)

-- GRUPO DE CLIENTE
AND (
    $P{P_GRUPOCLI} = 0
    OR cli.cli_cg_codigo = $P{P_GRUPOCLI}
)


/*****************************************
ORDENACAO
*****************************************/

ORDER BY

CASE
    WHEN $P{P_ORDEM} = 1
    THEN par.pardes
END,

CASE
    WHEN $P{P_ORDEM} = 2
    THEN par.parfan
END,

CASE
    WHEN $P{P_ORDEM} = 3
    THEN loc.locdes
END,

CASE
    WHEN $P{P_ORDEM} = 4
    THEN compra.vlcompra
END,

CASE
    WHEN $P{P_ORDEM} = 5
    THEN DATE(ultimacompra.dtultimacompra)
END,

par.parcod
]]>
	</queryString>
	<field name="relatorio" class="java.lang.String"/>
	<field name="dtimpr" class="java.lang.String"/>
	<field name="versao" class="java.lang.String"/>
	<field name="parcod" class="java.lang.Integer"/>
	<field name="pardes" class="java.lang.String"/>
	<field name="parfan" class="java.lang.String"/>
	<field name="parrua" class="java.lang.String"/>
	<field name="parbai" class="java.lang.String"/>
	<field name="parcep" class="java.lang.String"/>
	<field name="parcnpjcpf" class="java.lang.String"/>
	<field name="parfone" class="java.lang.String"/>
	<field name="mundes" class="java.lang.String"/>
	<field name="munufsigla" class="java.lang.String"/>
	<field name="locdes" class="java.lang.String"/>
	<field name="rades" class="java.lang.String"/>
	<field name="clircaparcod" class="java.lang.Integer"/>
	<field name="clibloq" class="java.lang.String"/>
	<field name="clibloqobs" class="java.lang.String"/>
	<field name="clilim" class="java.math.BigDecimal"/>
	<field name="vlcompra" class="java.math.BigDecimal"/>
	<field name="qtpedido" class="java.lang.Long"/>
	<field name="dtultimacompra" class="java.sql.Date"/>
	<field name="vlultimacompra" class="java.math.BigDecimal"/>
	<variable name="parcod_1" class="java.lang.Integer" calculation="Count">
		<variableExpression><![CDATA[$F{parcod}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="16" splitType="Stretch">
			<textField>
				<reportElement style="Data/Hora" x="566" y="0" width="248" height="16" uuid="1a30eeab-720b-4e64-9b1f-b06f483a1049"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{dtimpr}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement style="Título" x="0" y="0" width="566" height="16" uuid="1c06d63c-600b-4240-911e-b6d5485eea01"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="10" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{relatorio}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="28">
			<staticText>
				<reportElement style="Apr-Duplo" x="0" y="9" width="25" height="18" uuid="e896ef4f-3af5-4ebe-a6ba-c16d30ed8bff"/>
				<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
					<leftPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Cód.Cliente]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="25" y="9" width="130" height="18" uuid="c4bf5e5e-f5f1-48a6-b2d5-b2bd3a5e745d"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Cliente]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="155" y="9" width="100" height="18" uuid="30ed049d-d365-4164-a37b-eecce0aa094e"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Nome Fantasia]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="255" y="9" width="123" height="18" uuid="cc931cf4-b734-4487-857c-e1763326f7cd"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Endereço]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="444" y="9" width="78" height="18" uuid="0f6330d4-30f3-4410-84c9-2a627495f373"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Ramo de Atividade]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="701" y="9" width="18" height="18" uuid="cf705e80-693d-4015-bd40-f065f6cd720f"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Bloq]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="522" y="9" width="40" height="18" uuid="49115203-d302-4d8c-a90d-ab0c701383b3"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Lim.Crédito]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="562" y="9" width="25" height="18" uuid="be3d2794-7b61-4d73-8d1f-870377308f80"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Qt.Pedidos]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="587" y="9" width="42" height="18" uuid="8d795c8b-c038-45d9-91c0-62685f93841c"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Acumulado]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="629" y="9" width="36" height="18" uuid="e3ffa6a8-832d-47a5-9504-60c20f4366bd"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Vl.Últ.Compra]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="665" y="9" width="36" height="18" uuid="3f343351-6453-4944-a03c-f597b51f8007"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Dt.Últ.Compra]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="719" y="9" width="95" height="18" uuid="d736e19f-034a-4d3e-8fc8-0539cceeaea5"/>
				<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Motivo]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="378" y="9" width="50" height="18" uuid="a497f239-e14d-48b1-9ebf-d0cfdc92bfb7"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[Localidade]]></text>
			</staticText>
			<staticText>
				<reportElement style="Apr-Duplo" x="428" y="9" width="16" height="18" uuid="6907168e-9988-4196-a140-38acd02a8562"/>
				<textElement textAlignment="Center">
					<font size="6"/>
				</textElement>
				<text><![CDATA[UF]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Prevent">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="25" height="20" uuid="02776981-f56e-4390-b4ec-3693fe4f418a"/>
				<textElement textAlignment="Center">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{parcod}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="444" y="0" width="78" height="20" uuid="08980bf6-1c03-49cc-8f0b-9f2e0b952097"/>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{rades}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="701" y="0" width="18" height="20" uuid="191000eb-8615-4e69-8341-c139e3355c87"/>
				<textElement textAlignment="Center">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clibloq}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="522" y="0" width="40" height="20" uuid="806aaa80-252c-459a-ac33-1298ad4075a7"/>
				<textElement textAlignment="Right">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clilim}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" x="25" y="0" width="130" height="10" uuid="277fa7d1-08f7-4657-aea3-8c02d76bb687"/>
				<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
					<bottomPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pardes}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="155" y="0" width="100" height="20" uuid="c74f5b6c-72bc-4016-8b08-9f00931463b3"/>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{parfan}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="255" y="0" width="123" height="20" uuid="c881e8d8-4516-4acf-b15e-f35af926eb79"/>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{parrua}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="562" y="0" width="25" height="20" uuid="e38e30fc-c5d9-4892-ba4e-578ab2b92587"/>
				<textElement textAlignment="Center">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{qtpedido}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="587" y="0" width="42" height="20" uuid="04f2cf5b-8f40-455c-8701-f8136bbc820f"/>
				<textElement textAlignment="Right">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{vlcompra}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="629" y="0" width="36" height="20" uuid="ee41f418-df64-4c4c-a555-1cedaeb917b2"/>
				<textElement textAlignment="Right">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{vlultimacompra}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="665" y="0" width="36" height="20" uuid="7cd18d16-8c4d-44bf-b35c-ebf36ea95f0e"/>
				<textElement textAlignment="Center">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{dtultimacompra}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="719" y="0" width="95" height="20" uuid="7fe9329f-2ab3-4b0c-824c-498767cacd6c"/>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clibloqobs}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="378" y="0" width="50" height="20" uuid="b0972b40-9388-4092-a3ca-e27ac0146e24"/>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{locdes}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="428" y="0" width="16" height="20" uuid="6eca7f12-5f34-4315-8e18-ebb6b211cafa"/>
				<textElement textAlignment="Center">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{munufsigla}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Apr-Clean" positionType="Float" stretchType="RelativeToBandHeight" x="25" y="10" width="130" height="10" uuid="7343f961-0187-4434-a5e4-e963c921a1e2"/>
				<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
					<topPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Left">
					<font size="6" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{parcnpjcpf}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="21" splitType="Stretch">
			<textField>
				<reportElement x="657" y="6" width="99" height="15" uuid="c10f6055-cc6b-4ff8-aaa8-d41cf221a09d"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA["Página "+$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="6" width="657" height="15" uuid="3bb55df0-6cdd-41e9-b9cc-e3c7aeb44d06"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="7" isItalic="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{versao}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="756" y="6" width="58" height="15" uuid="37a3a4a7-651c-47d8-a164-ab19f3a1772e"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="20">
			<textField>
				<reportElement x="0" y="8" width="814" height="12" uuid="0030a546-15d3-4e3e-ae0e-4fabaef02421"/>
				<textElement textAlignment="Left" verticalAlignment="Middle" markup="none">
					<font size="7" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA["Número de registros: "+$V{parcod_1}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="47">
			<staticText>
				<reportElement x="192" y="10" width="474" height="37" uuid="4372fe93-fd84-4c02-ae5b-98d67ed362a5"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Este relatório não possui informações referente aos filtros informados. Tente filtrar com outras informações.]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
