<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd  -->
<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="wf_expedient" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="4437b410-94c4-40d0-ab63-c7e8186a62de">
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="wf3"/>
	<parameter name="idProcess" class="java.lang.String">
		<defaultValueExpression><![CDATA["1"]]></defaultValueExpression>
	</parameter>
	<parameter name="tableStatus" class="java.lang.String">
		<defaultValueExpression><![CDATA["EX04_STATUS"]]></defaultValueExpression>
	</parameter>
	<parameter name="language" class="java.lang.String">
		<defaultValueExpression><![CDATA["Spanish"]]></defaultValueExpression>
	</parameter>
	<queryString language="SQL">
		<![CDATA[SELECT
expedient.idexpedient,
expedient.process_idprocess,
expedient.ct_status_idct_status,
concat (status.catalogNum,' - ',status.catalogCode) Name_status,
expedient.codeExpedient,
expedient.title,
expedient.observations,
expedient.assignedUser,
ifnull(user1.NameAndSurname,'') Name_assignedUser,
expedient.creationDate,
expedient.creationUser,
ifnull(user2.NameAndSurname,'') Name_creationUser,
expedient.lastUpdateDate,
expedient.lastUpdateUser,
ifnull(user3.NameAndSurname,'') Name_lastUpdateUser,
expedient.finishDate,
expedient.ex04_advanceAmount
FROM expedient
join (
SELECT
s.idct_status,
s.catalogNum,
n.catalogCode
FROM ct_status s
join (
SELECT
s.idsuper_catalog,
s.superCode,
c.language,
c.catalogNum,
c.catalogCode,
c.description,
c.groupNum
FROM catalog AS c
INNER JOIN super_catalog AS s ON c.super_catalog_idsuper_catalog = s.idsuper_catalog
  ) n on ( s.catalogNum = n.catalogNum )
where process_idprocess = $P{idProcess} and  n.superCode = $P{tableStatus} and n.language = $P{language}) status
    on (status.idct_status = expedient.ct_status_idct_status )
left join user user1 on (user1.iduser = expedient.assignedUser)
left join user user2 on (user2.login = expedient.creationUser)
left join user user3 on (user3.login = expedient.lastUpdateUser)
ORDER by 3 asc, 1 asc]]>
	</queryString>
	<field name="idexpedient" class="java.lang.Integer">
		<property name="com.jaspersoft.studio.field.name" value="idexpedient"/>
		<property name="com.jaspersoft.studio.field.label" value="idexpedient"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="process_idprocess" class="java.lang.Integer">
		<property name="com.jaspersoft.studio.field.name" value="process_idprocess"/>
		<property name="com.jaspersoft.studio.field.label" value="process_idprocess"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="ct_status_idct_status" class="java.lang.Integer">
		<property name="com.jaspersoft.studio.field.name" value="ct_status_idct_status"/>
		<property name="com.jaspersoft.studio.field.label" value="ct_status_idct_status"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="Name_status" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="Name_status"/>
		<property name="com.jaspersoft.studio.field.label" value="Name_status"/>
	</field>
	<field name="codeExpedient" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="codeExpedient"/>
		<property name="com.jaspersoft.studio.field.label" value="codeExpedient"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="title" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="title"/>
		<property name="com.jaspersoft.studio.field.label" value="title"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="observations" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="observations"/>
		<property name="com.jaspersoft.studio.field.label" value="observations"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="assignedUser" class="java.lang.Integer">
		<property name="com.jaspersoft.studio.field.name" value="assignedUser"/>
		<property name="com.jaspersoft.studio.field.label" value="assignedUser"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="Name_assignedUser" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="Name_assignedUser"/>
		<property name="com.jaspersoft.studio.field.label" value="Name_assignedUser"/>
	</field>
	<field name="creationDate" class="java.sql.Timestamp">
		<property name="com.jaspersoft.studio.field.name" value="creationDate"/>
		<property name="com.jaspersoft.studio.field.label" value="creationDate"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="creationUser" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="creationUser"/>
		<property name="com.jaspersoft.studio.field.label" value="creationUser"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="Name_creationUser" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="Name_creationUser"/>
		<property name="com.jaspersoft.studio.field.label" value="Name_creationUser"/>
	</field>
	<field name="lastUpdateDate" class="java.sql.Timestamp">
		<property name="com.jaspersoft.studio.field.name" value="lastUpdateDate"/>
		<property name="com.jaspersoft.studio.field.label" value="lastUpdateDate"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="lastUpdateUser" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="lastUpdateUser"/>
		<property name="com.jaspersoft.studio.field.label" value="lastUpdateUser"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="Name_lastUpdateUser" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="Name_lastUpdateUser"/>
		<property name="com.jaspersoft.studio.field.label" value="Name_lastUpdateUser"/>
	</field>
	<field name="finishDate" class="java.sql.Timestamp">
		<property name="com.jaspersoft.studio.field.name" value="finishDate"/>
		<property name="com.jaspersoft.studio.field.label" value="finishDate"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="ex04_advanceAmount" class="java.math.BigDecimal">
		<property name="com.jaspersoft.studio.field.name" value="ex04_advanceAmount"/>
		<property name="com.jaspersoft.studio.field.label" value="ex04_advanceAmount"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="expedient"/>
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<group name="Name_status" isStartNewPage="true">
		<groupExpression><![CDATA[$F{Name_status}]]></groupExpression>
		<groupHeader>
			<band height="10">
				<property name="com.jaspersoft.studio.unit.height" value="px"/>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="5">
				<property name="com.jaspersoft.studio.unit.height" value="px"/>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="76">
			<staticText>
				<reportElement x="150" y="0" width="240" height="21" uuid="564818f1-08d5-429d-afd3-df0641761dd4"/>
				<box bottomPadding="1">
					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Center">
					<font size="14"/>
				</textElement>
				<text><![CDATA[Listado de Expedientes por Estado]]></text>
			</staticText>
			<staticText>
				<reportElement x="410" y="0" width="54" height="22" uuid="6b276955-cf1c-4140-93b6-6c722bc27e04"/>
				<textElement textAlignment="Right"/>
				<text><![CDATA[Fecha:]]></text>
			</staticText>
			<textField pattern="d/M/yyyy">
				<reportElement x="470" y="1" width="100" height="21" uuid="9a037ca8-f6b5-4e53-a017-0f27680b23ce"/>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="104" y="29" width="78" height="20" uuid="c44c5860-72f8-43dc-af40-e34a2ef89135">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="8518cbe1-2a15-4d25-8561-45751fb1be01"/>
				</reportElement>
				<textElement textAlignment="Right"/>
				<text><![CDATA[Estado:]]></text>
			</staticText>
			<textField>
				<reportElement x="184" y="28" width="220" height="20" uuid="bca31893-6150-44cd-88e5-92947f3adc81">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="8518cbe1-2a15-4d25-8561-45751fb1be01"/>
				</reportElement>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{Name_status}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="56" width="100" height="20" uuid="86729c83-0561-4d0c-a5d6-55e5f1269ada">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="17aaf14e-0ce8-4c6c-9c09-fbcda0c7fd66"/>
				</reportElement>
				<box bottomPadding="0">
					<pen lineWidth="0.5"/>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Center"/>
				<text><![CDATA[Expediente]]></text>
			</staticText>
			<staticText>
				<reportElement x="104" y="56" width="297" height="20" uuid="2899b045-36c0-4422-bc46-d8b184512a15">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="87fd4991-700a-49e5-b89f-6552b858ad45"/>
				</reportElement>
				<box bottomPadding="1">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<text><![CDATA[Título]]></text>
			</staticText>
			<image>
				<reportElement x="0" y="0" width="60" height="40" uuid="f17b25d4-b1b6-4f48-ba7d-bfc5b74a88dc">
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<imageExpression><![CDATA["https://fhumanes.com/report_jasper/imagenes/jasperLogo.png"]]></imageExpression>
			</image>
		</band>
	</pageHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<property name="com.jaspersoft.studio.unit.height" value="px"/>
			<textField>
				<reportElement x="0" y="0" width="100" height="20" uuid="c85a381b-b50e-41d8-b4c0-b0e539fd594b">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="17aaf14e-0ce8-4c6c-9c09-fbcda0c7fd66"/>
				</reportElement>
				<textFieldExpression><![CDATA[$F{codeExpedient}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="104" y="0" width="297" height="20" uuid="77138187-6121-4d3d-848c-0ad8849ef108">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="87fd4991-700a-49e5-b89f-6552b858ad45"/>
				</reportElement>
				<textFieldExpression><![CDATA[$F{title}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="40" splitType="Stretch">
			<textField>
				<reportElement x="350" y="0" width="100" height="20" uuid="dfcb0385-4802-4a4c-a73f-4dabcc309de9"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="450" y="0" width="100" height="20" uuid="9b250889-d6d2-4bda-9fe2-9c51684edd38"/>
				<textElement textAlignment="Left"/>
				<textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
</jasperReport>
