<?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="componentes_bloque"
		 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="SUBREPORT_DIR" isForPrompting="true" class="java.lang.String">
		<defaultValueExpression ><![CDATA[".\\src\\informes\\"]]></defaultValueExpression>
	</parameter>
	<parameter name="PR" isForPrompting="false" class="java.lang.Integer">
		<defaultValueExpression ><![CDATA[$P{PR}.valueOf( 1 )]]></defaultValueExpression>
	</parameter>
	<parameter name="BL" isForPrompting="false" class="java.lang.Integer">
		<defaultValueExpression ><![CDATA[$P{BL}.valueOf( 1 )]]></defaultValueExpression>
	</parameter>
	<parameter name="I" isForPrompting="false" class="java.lang.Integer">
		<defaultValueExpression ><![CDATA[$P{I}.valueOf( 3 )]]></defaultValueExpression>
	</parameter>
	<queryString language="hql"><![CDATA[from InformeComponentesBloque
where id_proyecto = $P{PR}
and id_bloque = $P{BL}
and id_instancia = $P{I}
order by posicion]]></queryString>

	<field name="idBloque" class="java.lang.Integer"/>
	<field name="idComponenteBloque" class="java.lang.Integer"/>
	<field name="idComponenteInstancia" class="java.lang.Integer"/>
	<field name="idInstancia" class="java.lang.Integer"/>
	<field name="idProyecto" class="java.lang.Integer"/>
	<field name="nombreBloque" class="java.lang.String"/>
	<field name="nombreComponente" class="java.lang.String"/>
	<field name="nombreInstancia" class="java.lang.String"/>
	<field name="nombreProyecto" class="java.lang.String"/>

	<variable name="num_componente" class="java.lang.Integer" resetType="Report" calculation="Count">
		<variableExpression><![CDATA[$F{idComponenteBloque}]]></variableExpression>
	</variable>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="50"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						mode="Opaque"
						x="0"
						y="6"
						width="534"
						height="40"
						forecolor="#000000"
						key="staticText"/>
					<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="28" isBold="true"/>
					</textElement>
				<text><![CDATA[CONTENIDO DE INSTANCIA]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="48"
						width="534"
						height="0"
						key="line"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="3"
						width="534"
						height="0"
						key="line"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
		</title>
		<pageHeader>
			<band height="85"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						mode="Opaque"
						x="153"
						y="68"
						width="374"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[ Contenido]]></text>
				</staticText>
				<staticText>
					<reportElement
						mode="Opaque"
						x="3"
						y="68"
						width="146"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[ Nombre componente]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="71"
						y="5"
						width="456"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{nombreProyecto}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="71"
						y="26"
						width="456"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{nombreBloque}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						mode="Opaque"
						x="3"
						y="47"
						width="62"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText-6"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[ Instancia:]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="71"
						y="47"
						width="456"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{nombreInstancia}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						mode="Opaque"
						x="3"
						y="26"
						width="62"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText-7"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[ Bloque:]]></text>
				</staticText>
				<staticText>
					<reportElement
						mode="Opaque"
						x="3"
						y="5"
						width="62"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText-8"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[ Proyecto:]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="28"  isSplitAllowed="true" >
				<line direction="BottomUp">
					<reportElement
						x="0"
						y="4"
						width="535"
						height="0"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<rectangle>
					<reportElement
						x="369"
						y="-73"
						width="0"
						height="0"
						key="rectangle-1"/>
					<graphicElement stretchType="NoStretch"/>
				</rectangle>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="3"
						y="9"
						width="144"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{nombreComponente}]]></textFieldExpression>
				</textField>
				<subreport  isUsingCache="true">
					<reportElement
						x="154"
						y="9"
						width="374"
						height="19"
						key="subreport-1"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$P{I}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportContenidoCheckBox.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="154"
						y="9"
						width="374"
						height="18"
						key="subreport-2"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$P{I}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteTexto.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="154"
						y="9"
						width="374"
						height="18"
						key="subreport-3"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$P{I}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteFecha.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="154"
						y="9"
						width="374"
						height="18"
						key="subreport-4"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$P{I}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponentePortafolio.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="153"
						y="9"
						width="374"
						height="18"
						key="subreport-5"
						isPrintWhenDetailOverflows="true"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$P{I}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="CI">
						<subreportParameterExpression><![CDATA[$F{idComponenteInstancia}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteLista.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="154"
						y="9"
						width="372"
						height="17"
						key="subreport-6"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$F{idInstancia}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponentePuntuacionMM.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="153"
						y="10"
						width="374"
						height="18"
						key="subreport-7"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$F{idInstancia}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteMediaParcialMM.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="153"
						y="10"
						width="374"
						height="18"
						key="subreport-8"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$F{idInstancia}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteMediaGlobalMM.jasper"]]></subreportExpression>
				</subreport>
				<subreport  isUsingCache="true">
					<reportElement
						x="153"
						y="9"
						width="374"
						height="19"
						key="subreport-9"/>
					<parametersMapExpression><![CDATA[new HashMap($P{REPORT_PARAMETERS_MAP})]]></parametersMapExpression>
					<subreportParameter  name="CB">
						<subreportParameterExpression><![CDATA[$F{idComponenteBloque}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="I">
						<subreportParameterExpression><![CDATA[$F{idInstancia}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "componentes_bloque_subreportComponenteFechaMM.jasper"]]></subreportExpression>
				</subreport>
			</band>
		</detail>
		<columnFooter>
			<band height="25"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="24"
						y="17"
						width="0"
						height="0"
						key="staticText-2"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<text><![CDATA[Texto estático]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="4"
						y="4"
						width="143"
						height="20"
						key="staticText-3"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[TOTAL COMPONENTES:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="153"
						y="4"
						width="374"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{num_componente}]]></textFieldExpression>
				</textField>
			</band>
		</columnFooter>
		<pageFooter>
			<band height="27"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="325"
						y="4"
						width="170"
						height="19"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField"/>
					<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 size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="499"
						y="4"
						width="36"
						height="19"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField"/>
					<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 size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="3"
						width="535"
						height="0"
						key="line"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="1"
						y="6"
						width="209"
						height="19"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField"/>
					<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 size="10"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
