<?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="activos" language="groovy" pageWidth="1900" pageHeight="595" orientation="Landscape" columnWidth="1860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/tm_activos"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<queryString>
		<![CDATA[select tab1.codigo_bar, tab1.placa, tab0.id_inventario_dv, codv.codigo_elemento, tab0.descripcion, '' as material, '' as color, tab1.serie, codv.modelo, '' as marca, '' as estado, tab0.id_espacio, estr.nombre as desc_estructura, tab0.fecha_ingreso, tab0.costo_inicial, inter.num_doc, cl.descripcion as desc_parte

from in_inventario_dv tab0
left join in_partes_inventario tab1 on tab0.id_inventario_dv = tab1.id_inventario_dv
left join in_partes_clase cl on tab1.id_partes_clase =cl.id_partes_clase
join in_codigo_elemento_v codv on tab0.id_linea=codv.id_linea and tab0.id_clase=codv.id_clase and tab0.id_catalogo=codv.id_catalogo
join in_espacio espa on tab0.id_espacio=espa.id_espacio
join in_estructura estr on espa.id_estructura=estr.id_estructura
join interceros_v inter on tab0.id_mae_ter = inter.id_mae_ter

where tab0.estado=1

order by tab0.id_inventario_dv]]>
	</queryString>
	<field name="CODIGO_BAR" class="java.lang.String"/>
	<field name="PLACA" class="java.lang.String"/>
	<field name="ID_INVENTARIO_DV" class="java.math.BigDecimal"/>
	<field name="CODIGO_ELEMENTO" class="java.lang.String"/>
	<field name="DESCRIPCION" class="java.lang.String"/>
	<field name="MATERIAL" class="java.lang.String"/>
	<field name="COLOR" class="java.lang.String"/>
	<field name="SERIE" class="java.lang.String"/>
	<field name="MODELO" class="java.lang.String"/>
	<field name="MARCA" class="java.lang.String"/>
	<field name="ESTADO" class="java.lang.String"/>
	<field name="ID_ESPACIO" class="java.math.BigDecimal"/>
	<field name="DESC_ESTRUCTURA" class="java.lang.String"/>
	<field name="FECHA_INGRESO" class="java.sql.Timestamp"/>
	<field name="COSTO_INICIAL" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="DESC_PARTE" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[CodiBarras]]></text>
			</staticText>
			<staticText>
				<reportElement x="180" y="0" width="65" height="20"/>
				<textElement/>
				<text><![CDATA[Placa]]></text>
			</staticText>
			<staticText>
				<reportElement x="245" y="0" width="116" height="20"/>
				<textElement/>
				<text><![CDATA[Codigo Elemento]]></text>
			</staticText>
			<staticText>
				<reportElement x="361" y="0" width="244" height="20"/>
				<textElement/>
				<text><![CDATA[Nombre Elemento]]></text>
			</staticText>
			<staticText>
				<reportElement x="805" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[Material]]></text>
			</staticText>
			<staticText>
				<reportElement x="885" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[Color]]></text>
			</staticText>
			<staticText>
				<reportElement x="965" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[Serie]]></text>
			</staticText>
			<staticText>
				<reportElement x="1045" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[Modelo]]></text>
			</staticText>
			<staticText>
				<reportElement x="1125" y="0" width="95" height="20"/>
				<textElement/>
				<text><![CDATA[Codigo Marca]]></text>
			</staticText>
			<staticText>
				<reportElement x="1220" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[Estado]]></text>
			</staticText>
			<staticText>
				<reportElement x="1300" y="0" width="129" height="20"/>
				<textElement/>
				<text><![CDATA[Codigo Dependencia]]></text>
			</staticText>
			<staticText>
				<reportElement x="1538" y="0" width="161" height="20"/>
				<textElement/>
				<text><![CDATA[ResponsableElemento]]></text>
			</staticText>
			<staticText>
				<reportElement x="1699" y="0" width="80" height="20"/>
				<textElement/>
				<text><![CDATA[FechaCompra]]></text>
			</staticText>
			<staticText>
				<reportElement x="1779" y="0" width="81" height="20"/>
				<textElement/>
				<text><![CDATA[CostoInicial]]></text>
			</staticText>
			<staticText>
				<reportElement x="1429" y="0" width="109" height="20"/>
				<textElement/>
				<text><![CDATA[Sede]]></text>
			</staticText>
			<staticText>
				<reportElement x="80" y="0" width="100" height="20"/>
				<textElement/>
				<text><![CDATA[Id Unico Elemento]]></text>
			</staticText>
			<staticText>
				<reportElement x="605" y="0" width="200" height="20"/>
				<textElement/>
				<text><![CDATA[Nombre Parte]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO_BAR}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="180" y="0" width="65" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PLACA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="245" y="0" width="116" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CODIGO_ELEMENTO}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="361" y="0" width="244" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCRIPCION}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="805" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MATERIAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="885" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COLOR}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="965" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SERIE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1045" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MODELO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1125" y="0" width="95" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MARCA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1220" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ESTADO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1300" y="0" width="129" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ID_ESPACIO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1429" y="0" width="109" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_ESTRUCTURA}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1538" y="0" width="161" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1699" y="0" width="80" height="20"/>
				<textElement/>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_INGRESO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="1779" y="0" width="81" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{COSTO_INICIAL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="80" y="0" width="100" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ID_INVENTARIO_DV}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToTallestObject" x="605" y="0" width="200" height="20"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_PARTE}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
</jasperReport>
