<?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="formato_programacion_comision_destinos" language="groovy" pageWidth="310" pageHeight="300" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="310" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.771561000000001"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="id_comision" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="nitocc" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT

tab0.*,
mun.municipio,
dep.descripcion as departamento

FROM destinos_comisionados tab0

left join municipios mun
on mun.codmun = tab0.codmun

left join departamento dep
on dep.id_depto = mun.depto

where
tab0.id_comision = $P{id_comision}
and tab0.vigencia = $P{vigencia}
and tab0.nitocc = $P{nitocc}

order by
tab0.vigencia,
tab0.id_comision,
tab0.fecha_ini,
tab0.fecha_fin,
tab0.codmun
]]>
	</queryString>
	<field name="NITOCC" class="java.math.BigDecimal"/>
	<field name="ID_COMISION" class="java.math.BigDecimal"/>
	<field name="CODMUN" class="java.lang.String"/>
	<field name="ORDEN" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="VIGENCIA" class="java.math.BigDecimal"/>
	<field name="ID_TRANSPORTE" class="java.math.BigDecimal"/>
	<field name="FECHA_INI" class="java.sql.Timestamp"/>
	<field name="FECHA_FIN" class="java.sql.Timestamp"/>
	<field name="NUM_DIAS" class="java.math.BigDecimal"/>
	<field name="MUNICIPIO" class="java.lang.String"/>
	<field name="DEPARTAMENTO" class="java.lang.String"/>
	<detail>
		<band height="20" splitType="Stretch">
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="50" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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" markup="none">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_FIN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="260" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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" markup="none">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DIAS}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="180" y="0" width="80" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="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" markup="none">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{MUNICIPIO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement mode="Transparent" x="100" y="0" width="80" height="20" backcolor="#FEFEFE"/>
				<box leftPadding="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" markup="none">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DEPARTAMENTO}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement mode="Transparent" x="0" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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" markup="none">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_INI}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<noData>
		<band height="20">
			<staticText>
				<reportElement mode="Transparent" x="50" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="260" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="180" y="0" width="80" height="20" backcolor="#FEFEFE"/>
				<box>
					<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="100" y="0" width="80" height="20" backcolor="#FEFEFE"/>
				<box>
					<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="0" y="0" width="50" height="20" backcolor="#FEFEFE"/>
				<box>
					<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="8" isBold="true"/>
				</textElement>
				<text><![CDATA[]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
