<?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="report name" pageWidth="600" pageHeight="200" columnWidth="570" leftMargin="10" rightMargin="20" topMargin="1" bottomMargin="2">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_mae_ter" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[6419]]></defaultValueExpression>
	</parameter>
	<parameter name="empresa" class="java.lang.String">
		<defaultValueExpression><![CDATA["SERVICIO GEOLOGICO"]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select trim(to_char(sum(tab0.saldo_actual),'$999,999,999,999,999.99')) AS SALDO_TOTAL

from ca_debito_saldos tab0

where tab0.id_mae_ter = $P{id_mae_ter}
and tab0.estado_ven = 1
and tab0.id_meses_sal = 8 and tab0.id_anhos_sal = 2012
and tab0.fecha_vence <= trunc(last_day(to_date('8/2012','mm/yyyy')))
and tab0.id_mae_ter != 2176
--AND tab0.id_punto_venta != 4
and tab0.saldo_actual >0]]>
	</queryString>
	<field name="SALDO_TOTAL" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="36" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="520" height="36"/>
				<textElement textAlignment="Justified"/>
				<textFieldExpression class="java.lang.String"><![CDATA["Una vez analizada la cartera de "+$P{empresa}+", hemos encontrado que a la fecha Usted adeuda la suma de "+$F{SALDO_TOTAL}+" tal como se detalla a continuación."]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
