<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
		 name="OUTROS_DOCUMENTOS_FISCAIS_POR_CST"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="595"
		 pageHeight="842"
		 columnWidth="535"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="NoPages"
		 isTitleNewPage="false"
		 isSummaryNewPage="false">
	<property name="ireport.scriptlethandling" value="0" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<parameter name="LOGO" isForPrompting="false" class="java.lang.String"/>
	<parameter name="NOME_EMPRESA" isForPrompting="false" class="java.lang.String"/>
	<parameter name="CNPJ_NOME" isForPrompting="false" class="java.lang.String"/>
	<parameter name="INSCRICAO_ESTADUAL_NOME" isForPrompting="false" class="java.lang.String"/>
	<parameter name="DATA_INICIAL" isForPrompting="true" class="java.util.Date"/>
	<parameter name="DATA_FINAL" isForPrompting="true" class="java.util.Date"/>
	<parameter name="QUEBRA" isForPrompting="true" class="java.lang.Integer"/>
	<parameter name="FECHO" isForPrompting="false" class="java.lang.String"/>
	<parameter name="TIPO" isForPrompting="true" class="java.lang.Integer"/>
	<parameter name="SUBREPORT_DIR_OUTR" isForPrompting="true" class="java.lang.String"/>
	<parameter name="LOGO_RELATORIO" isForPrompting="false" class="net.sf.jasperreports.engine.JRImageRenderer"/>
	<parameter name="SUBREPORT_DIR" isForPrompting="true" class="java.lang.String">
		<defaultValueExpression ><![CDATA["D:\\Projetos\\Mentor_Novo\\relatorios\\"]]></defaultValueExpression>
	</parameter>
	<parameter name="ID_EMPRESA" isForPrompting="true" class="java.lang.Integer"/>
	<queryString><![CDATA[SELECT
     distinct L.id_cfop,c.codigo
FROM
    livro_fiscal L
inner join
    cfop c on (c.id_cfop=l.id_cfop)
WHERE
l.id_empresa=$P{ID_EMPRESA}
AND
l.data_livro BETWEEN $P{DATA_INICIAL} AND $P{DATA_FINAL}
order by
    c.codigo]]></queryString>

	<field name="ID_CFOP" class="java.lang.Integer"/>
	<field name="CODIGO" class="java.lang.String"/>

	<variable name="dataRel" class="java.util.Date" resetType="Page" calculation="Nothing">
		<initialValueExpression><![CDATA[new java.util.Date()]]></initialValueExpression>
	</variable>
	<variable name="VALOR_CONTABIL" class="java.lang.Double" resetType="Report" calculation="Sum">
	</variable>
	<variable name="BC_CALCULO" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="ICMS_SEM_APROVEITAMENTO" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="ISENTO" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="OUTRAS" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="BC_ST" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="ICMS_ST" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="VALOR_TOTAL_ICMS" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="PIS" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
	<variable name="COFINS" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
	</variable>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="53"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="155"
						y="9"
						width="279"
						height="17"
						key="textField-13"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Top">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{NOME_EMPRESA}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="434"
						y="16"
						width="35"
						height="14"
						key="staticText-15"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<text><![CDATA[Data :]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="434"
						y="32"
						width="35"
						height="14"
						key="staticText-16"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<text><![CDATA[Hora :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd/MM/yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="468"
						y="16"
						width="67"
						height="14"
						key="textField-14"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement verticalAlignment="Middle">
						<font size="10"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$V{dataRel}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="HH.mm.ss" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="468"
						y="32"
						width="67"
						height="14"
						key="textField-15"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement verticalAlignment="Middle">
						<font size="10"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$V{dataRel}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="159"
						y="33"
						width="27"
						height="12"
						key="staticText-17"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement>
						<font pdfFontName="Helvetica-BoldOblique" size="8" isBold="true" isItalic="true"/>
					</textElement>
				<text><![CDATA[CNPJ :]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="268"
						y="33"
						width="77"
						height="12"
						key="staticText-18"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement>
						<font pdfFontName="Helvetica-BoldOblique" size="8" isBold="true" isItalic="true"/>
					</textElement>
				<text><![CDATA[Inscrição Estadual :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="187"
						y="33"
						width="80"
						height="12"
						key="textField-16"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{CNPJ_NOME}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="346"
						y="33"
						width="85"
						height="12"
						key="textField-17"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{INSCRICAO_ESTADUAL_NOME}]]></textFieldExpression>
				</textField>
				<image  onErrorType="Blank" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="1"
						width="154"
						height="52"
						key="image-1"/>
					<box></box>
					<graphicElement stretchType="NoStretch"/>
					<imageExpression class="net.sf.jasperreports.engine.JRRenderable"><![CDATA[$P{LOGO_RELATORIO}]]></imageExpression>
				</image>
			</band>
		</title>
		<pageHeader>
			<band height="14"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="0"
						width="333"
						height="14"
						key="staticText-5"
						positionType="Float"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Top">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[LISTAGEM DE DOCUMENTOS FISCAIS POR C.S.T - COMPETENCIA - ]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd/MM/yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="333"
						y="0"
						width="49"
						height="12"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="8"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd/MM/yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="398"
						y="0"
						width="46"
						height="12"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="8"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="382"
						y="0"
						width="14"
						height="14"
						key="staticText-36"
						positionType="Float"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Top">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[A]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="448"
						y="0"
						width="65"
						height="14"
						key="staticText-50"
						positionType="Float">
							<printWhenExpression><![CDATA[new Boolean($P{TIPO}.intValue()==0)]]></printWhenExpression>
						</reportElement>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Top">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[- ENTRADAS]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="448"
						y="0"
						width="65"
						height="14"
						key="staticText-51"
						positionType="Float">
							<printWhenExpression><![CDATA[new Boolean($P{TIPO}.intValue()==1)]]></printWhenExpression>
						</reportElement>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Top">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[- SAÍDAS]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="41"  isSplitAllowed="true" >
				<rectangle>
					<reportElement
						x="0"
						y="2"
						width="535"
						height="24"
						forecolor="#CCCCCC"
						backcolor="#CCCCCC"
						key="rectangle-1"/>
					<graphicElement stretchType="NoStretch"/>
				</rectangle>
				<staticText>
					<reportElement
						x="257"
						y="16"
						width="45"
						height="10"
						key="staticText-37"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Isen/N.Trib.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="303"
						y="16"
						width="37"
						height="10"
						key="staticText-38"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Outras]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="395"
						y="16"
						width="39"
						height="10"
						key="staticText-40"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Icms ST]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="340"
						y="16"
						width="46"
						height="10"
						key="staticText-41"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[B.Calc.St]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="1"
						y="16"
						width="25"
						height="10"
						key="staticText-42"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[C.S.T]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="52"
						y="16"
						width="48"
						height="10"
						key="staticText-43"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Contabil]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="163"
						y="16"
						width="43"
						height="10"
						key="staticText-44"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Icms Dest]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="105"
						y="16"
						width="53"
						height="10"
						key="staticText-45"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Base Calculo]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="211"
						y="16"
						width="45"
						height="10"
						key="staticText-46"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Icms S/AP]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="84"
						y="4"
						width="71"
						height="10"
						key="staticText-47"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[VALOR CONTABIL]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="178"
						y="5"
						width="72"
						height="10"
						key="staticText-48"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[BASE DE CALCULO]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="25"
						y="16"
						width="25"
						height="10"
						key="staticText-49"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[CPOF]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="442"
						y="16"
						width="39"
						height="10"
						key="staticText-52"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Pis]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="487"
						y="16"
						width="39"
						height="10"
						key="staticText-53"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="7" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[Vr.Cofins]]></text>
				</staticText>
			</band>
		</columnHeader>
		<detail>
			<band height="21"  isSplitAllowed="true" >
				<subreport  isUsingCache="true">
					<reportElement
						x="2"
						y="1"
						width="532"
						height="1"
						key="subreport-1"
						positionType="Float"
						isRemoveLineWhenBlank="true"
						isPrintInFirstWholeBand="true"
						isPrintWhenDetailOverflows="true">
							<printWhenExpression><![CDATA[new Boolean($P{TIPO}.intValue()==0)]]></printWhenExpression>
						</reportElement>
					<subreportParameter  name="DATA_INICIAL">
						<subreportParameterExpression><![CDATA[$P{DATA_INICIAL}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="ID_CFOP">
						<subreportParameterExpression><![CDATA[$F{ID_CFOP}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="DATA_FINAL">
						<subreportParameterExpression><![CDATA[$P{DATA_FINAL}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="ID_EMPRESA">
						<subreportParameterExpression><![CDATA[$P{ID_EMPRESA}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<returnValue subreportVariable="TOTAL_OUTRAS" toVariable="OUTRAS" calculation="Sum"/>
					<returnValue subreportVariable="TOTA_ISENTO" toVariable="ISENTO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_VALOR_CONTABIL" toVariable="VALOR_CONTABIL" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_BASE_CALCULO" toVariable="BC_CALCULO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_ICMS_ST" toVariable="ICMS_ST" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_ICMS_SEM_APROVEITAMENTO" toVariable="ICMS_SEM_APROVEITAMENTO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_BC_CALC_ST" toVariable="BC_ST" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_ICMS_1" toVariable="VALOR_TOTAL_ICMS" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_PIS_1" toVariable="PIS" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_COFINS_1" toVariable="COFINS" calculation="Sum"/>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR_OUTR}+"SUB_OUTROS_DOCUMENTOS_FISCAIS_POR_CST_ENTRADA.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="2"
						y="1"
						width="532"
						height="1"
						key="subreport-2"
						positionType="Float"
						isRemoveLineWhenBlank="true"
						isPrintInFirstWholeBand="true"
						isPrintWhenDetailOverflows="true">
							<printWhenExpression><![CDATA[new Boolean($P{TIPO}.intValue()==1)]]></printWhenExpression>
						</reportElement>
					<subreportParameter  name="DATA_INICIAL">
						<subreportParameterExpression><![CDATA[$P{DATA_INICIAL}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="ID_CFOP">
						<subreportParameterExpression><![CDATA[$F{ID_CFOP}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="DATA_FINAL">
						<subreportParameterExpression><![CDATA[$P{DATA_FINAL}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="ID_EMPRESA">
						<subreportParameterExpression><![CDATA[$P{ID_EMPRESA}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<returnValue subreportVariable="TOTAL_OUTRAS" toVariable="OUTRAS" calculation="Sum"/>
					<returnValue subreportVariable="TOTA_ISENTO" toVariable="ISENTO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_VALOR_CONTABIL" toVariable="VALOR_CONTABIL" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_BASE_CALCULO" toVariable="BC_CALCULO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_ICMS_ST" toVariable="ICMS_ST" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_ICMS_SEM_APROVEITAMENTO" toVariable="ICMS_SEM_APROVEITAMENTO" calculation="Sum"/>
					<returnValue subreportVariable="TOTAL_BC_CALC_ST" toVariable="BC_ST" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_ICMS_1" toVariable="VALOR_TOTAL_ICMS" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_PIS_1" toVariable="PIS" calculation="Sum"/>
					<returnValue subreportVariable="SUM_VALOR_CONFIS_1" toVariable="COFINS" calculation="Sum"/>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR_OUTR}+"SUB_OUTROS_DOCUMENTOS_FISCAIS_POR_CST_SAIDAS.jasper"]]></subreportExpression>
				</subreport>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="15"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="487"
						y="0"
						width="17"
						height="15"
						key="textField-10"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font pdfFontName="Helvetica-Bold" size="9" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="512"
						y="0"
						width="17"
						height="15"
						key="textField-11"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font pdfFontName="Helvetica-Bold" size="9" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="504"
						y="0"
						width="8"
						height="15"
						key="staticText-10"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<text><![CDATA[/]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="RemotePage"  hyperlinkTarget="Self" >
					<reportElement
						x="325"
						y="1"
						width="160"
						height="14"
						forecolor="#0099FF"
						key="textField-18"/>
					<box></box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Oblique" size="9" isItalic="true" isUnderline="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["www.contatosistemas.com"]]></textFieldExpression>
						<hyperlinkReferenceExpression><![CDATA["HTTP://WWW.CONTATOSISTEMAS.COM"]]></hyperlinkReferenceExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="37"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="14"
						width="535"
						height="23"
						key="textField-12"
						positionType="Float"
						isRemoveLineWhenBlank="true"/>
					<box></box>
					<textElement textAlignment="Center" markup="html">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{FECHO}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="-2"
						y="2"
						width="50"
						height="11"
						key="staticText-35"
						positionType="Float"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true" isItalic="false"/>
					</textElement>
				<text><![CDATA[TOTAIS:]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="55"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{VALOR_CONTABIL}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="107"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{BC_CALCULO}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="197"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{ICMS_SEM_APROVEITAMENTO}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="239"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{ISENTO}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="290"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{OUTRAS}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="337"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{BC_ST}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="386"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{ICMS_ST}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="2"
						width="48"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{VALOR_TOTAL_ICMS}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="436"
						y="2"
						width="45"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{PIS}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="486"
						y="2"
						width="45"
						height="11"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{COFINS}]]></textFieldExpression>
				</textField>
			</band>
		</summary>
</jasperReport>
