<?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="800" pageHeight="842" columnWidth="760" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.331000000000001"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/INF_HIS_COD"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="id_meses" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[2]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[2012]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTercero" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCenOp" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereLinea" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereClase" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereCatalogo" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="whereTipoAlmacenamiento" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="username" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select tab0.* from (
SELECT
tab0.ID_INVENTARIO_DV
,tab0.ID_CEN_OP
,tab0.ID_ESPACIO
,tab0.ID_MAE_TER
,tab0.ID_TIPO_ALMACENAMIENTO
,tab0.CODIGO
,tab0.FECHA_INGRESO
,tab0.ID_LINEA
,tab0.ID_CLASE
,tab0.ID_CATALOGO
,tab0.DESCRIPCION
,tab0.COSTO_INICIAL
,tab0.COSTO_ACTUAL
,tab0.ESTADO
,tab0.VIDA_UTIL
,tab0.DIAS_DEPRECIADOS
,tab0.FECHA_MOD
,tab0.EN_PROCESO
,tab0.COORDENADA_X
,tab0.COORDENADA_Y
, tab1.CODIGO_ELEMENTO
, tab2.prefijo
, tab3.descripcion as desc_tipo_almacenamiento
, tab4.num_doc
, tab4.razon_soc
, to_char(tab0.FECHA_MOD, 'mm/yyyy') as periodo
, tab5.descripcion as meses
FROM
in_inventario_dv tab0
join in_codigo_elemento_v tab1 on tab1.id_linea= tab0.id_linea and tab0.id_catalogo=tab1.id_catalogo and tab0.id_clase=tab1.id_clase
join centro_operacion tab2 on tab0.id_cen_op=tab2.id_cen_op
join in_tipo_almacenamiento tab3 on tab0.id_tipo_almacenamiento = tab3.id_tipo_almacenamiento
join interceros_v tab4 on tab0.id_mae_ter = tab4.id_mae_ter
join meses tab5 on tab5.id_meses= $P{id_meses}
) tab0
where to_date(periodo , 'mm/yyyy') <= to_date(($P{id_meses}||'/'||$P{vigencia}), 'mm/yyyy')
$P!{whereCatalogo}$P!{whereCenOp}$P!{whereClase}$P!{whereLinea}$P!{whereTercero}$P!{whereTipoAlmacenamiento}
order by prefijo, codigo_elemento, id_inventario_dv]]>
	</queryString>
	<field name="ID_INVENTARIO_DV" class="java.math.BigDecimal"/>
	<field name="ID_CEN_OP" class="java.math.BigDecimal"/>
	<field name="ID_ESPACIO" class="java.math.BigDecimal"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_ALMACENAMIENTO" class="java.math.BigDecimal"/>
	<field name="CODIGO" class="java.math.BigDecimal"/>
	<field name="FECHA_INGRESO" class="java.sql.Timestamp"/>
	<field name="ID_LINEA" class="java.math.BigDecimal"/>
	<field name="ID_CLASE" class="java.math.BigDecimal"/>
	<field name="ID_CATALOGO" class="java.math.BigDecimal"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="COSTO_INICIAL" class="java.math.BigDecimal"/>
	<field name="COSTO_ACTUAL" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="VIDA_UTIL" class="java.math.BigDecimal"/>
	<field name="DIAS_DEPRECIADOS" class="java.math.BigDecimal"/>
	<field name="FECHA_MOD" class="java.sql.Timestamp"/>
	<field name="EN_PROCESO" class="java.math.BigDecimal"/>
	<field name="COORDENADA_X" class="java.math.BigDecimal"/>
	<field name="COORDENADA_Y" class="java.math.BigDecimal"/>
	<field name="CODIGO_ELEMENTO" class="java.lang.String"/>
	<field name="PREFIJO" class="java.lang.String"/>
	<field name="DESC_TIPO_ALMACENAMIENTO" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="RAZON_SOC" class="java.lang.String"/>
	<field name="PERIODO" class="java.lang.String"/>
	<field name="MESES" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="101" splitType="Stretch">
			<image>
				<reportElement x="1" y="0" width="137" height="58"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<textField pattern="dd/MM/yyyy h:mm a">
				<reportElement x="607" y="13" width="144" height="16"/>
				<box rightPadding="3"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="605" y="1" width="144" height="16" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha de Impresión:]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="258" y="72" width="324" height="18"/>
				<box leftPadding="2" rightPadding="2">
					<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="14" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Periodo de "+$F{MESES}+" del "+$P{vigencia}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="144" y="13" width="467" height="59"/>
				<textElement textAlignment="Center" verticalAlignment="Bottom" markup="none">
					<font fontName="SansSerif" size="20" isBold="true"/>
				</textElement>
				<text><![CDATA[Control De Recursos Físicos
Informe Histórico por Código]]></text>
			</staticText>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="18" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="467" y="0" width="84" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Responsable]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="595" y="0" width="82" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Costo Histórico]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="373" y="0" width="94" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Tipo Almacenamiento]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="1" y="0" width="59" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Centro Operación]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="159" y="0" width="214" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Descripción]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="551" y="0" width="44" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Estado]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="677" y="0" width="82" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[Costo Depreciable]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="123" y="0" width="36" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[No. Sec]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="60" y="0" width="63" height="18" backcolor="#88C2F9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7" isBold="true"/>
				</textElement>
				<text><![CDATA[ Códígo]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
				<reportElement x="595" y="0" width="82" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_INICIAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="551" y="0" width="44" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ESTADO}.intValue() == 1 ? "Activo" : "Inactivo"]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
				<reportElement x="677" y="0" width="82" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_ACTUAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="373" y="0" width="94" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_TIPO_ALMACENAMIENTO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="159" y="0" width="214" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCRIPCION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="467" y="0" width="84" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOC}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="123" y="0" width="36" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ID_INVENTARIO_DV}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="1" y="0" width="59" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PREFIJO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="60" y="0" width="63" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO_ELEMENTO}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="9" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="54" splitType="Stretch">
			<staticText>
				<reportElement x="285" y="0" width="203" height="20"/>
				<textElement/>
				<text><![CDATA[Websafi - Control De Recursos Físicos
]]></text>
			</staticText>
			<textField>
				<reportElement x="373" y="20" width="100" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="314" y="20" width="100" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA["Página "+$V{PAGE_NUMBER}+" de "]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="1" y="42" width="158" height="12" forecolor="#575757" backcolor="#FFFFFF"/>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Impreso por: "+$P{username}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="42" splitType="Stretch"/>
	</summary>
</jasperReport>
