<?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="phases"
		 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="PL" isForPrompting="false" class="java.lang.Integer">
		<defaultValueExpression ><![CDATA[$P{PL}.valueOf(2)]]></defaultValueExpression>
	</parameter>
	<queryString language="hql"><![CDATA[from FasePlantilla where id_plantilla = $P{PL}]]></queryString>

	<field name="nombre" class="java.lang.String"/>
	<field name="orden" class="java.lang.Integer"/>
	<field name="plantilla" class="java.lang.Object"/>

	<variable name="num_fases" class="java.lang.Integer" resetType="Report" calculation="Count">
		<variableExpression><![CDATA[$F{nombre}]]></variableExpression>
	</variable>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="50"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="61"
						y="5"
						width="412"
						height="40"
						forecolor="#000000"
						backcolor="#FFFFFF"
						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="30" isBold="true"/>
					</textElement>
				<text><![CDATA[LIST OF PHASES]]></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="64"  isSplitAllowed="true" >
				<line direction="BottomUp">
					<reportElement
						x="0"
						y="9"
						width="535"
						height="0"
						key="line"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						mode="Opaque"
						x="7"
						y="43"
						width="431"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12" isUnderline="false"/>
					</textElement>
				<text><![CDATA[ Name:]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="85"
						y="14"
						width="445"
						height="19"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[""+$F{plantilla}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						mode="Opaque"
						x="7"
						y="14"
						width="70"
						height="19"
						backcolor="#AAD6FB"
						key="staticText-3"/>
					<box>					<pen lineWidth="0.5" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineColor="#003399"/>
</box>
					<textElement>
						<font pdfFontName="Helvetica" size="12" isBold="false" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[ Framework: Plantilla:]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="2"
						y="37"
						width="530"
						height="0"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						mode="Opaque"
						x="444"
						y="43"
						width="86"
						height="17"
						forecolor="#000000"
						backcolor="#AAD6FB"
						key="staticText-4"
						positionType="Float"/>
					<box>					<pen lineWidth="0.5" lineColor="#003399"/>
					<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
					<bottomPen lineWidth="0.5" lineColor="#003399"/>
					<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#003399"/>
</box>
					<textElement>
						<font size="12" isUnderline="false"/>
					</textElement>
				<text><![CDATA[ Order:]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="25"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="7"
						y="4"
						width="431"
						height="17"
						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[$F{nombre}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="444"
						y="3"
						width="87"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$F{orden}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="24"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="20"
						y="17"
						width="0"
						height="0"
						key="staticText-1"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<text><![CDATA[Texto estático]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="7"
						y="4"
						width="98"
						height="20"
						key="staticText-2"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<text><![CDATA[TOTAL PHASES:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="111"
						y="4"
						width="419"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{num_fases}]]></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>
