From af24673ad20289d34b34e9dc06b90106d2237cbb Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Mon, 28 Dec 2009 13:13:37 +0100 Subject: [PATCH] ItEr41S12CUInformeListaAvancesTrabajoItEr40S17: Show each row in card format --- .../dtos/WorkingProgressPerTaskDTO.java | 8 +- .../jasper/workingProgressPerTaskReport.jrxml | 518 ++++++++++-------- 2 files changed, 300 insertions(+), 226 deletions(-) diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/WorkingProgressPerTaskDTO.java b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/WorkingProgressPerTaskDTO.java index 74225993b..b8800b9a1 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/WorkingProgressPerTaskDTO.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/WorkingProgressPerTaskDTO.java @@ -71,7 +71,13 @@ public class WorkingProgressPerTaskDTO { public WorkingProgressPerTaskDTO(Task task, LocalDate date) { this(); - this.taskName = task.getName(); + + String taskName = task.getName(); + if (taskName == null || taskName.isEmpty()) { + taskName = task.getOrderElement().getName(); + } + this.taskName = taskName; + this.estimatedHours = task.getHoursSpecifiedAtOrder(); this.totalPlannedHours = calculatePlannedHours(task, null); this.partialPlannedHours = calculatePlannedHours(task, date); diff --git a/navalplanner-webapp/src/main/jasper/workingProgressPerTaskReport.jrxml b/navalplanner-webapp/src/main/jasper/workingProgressPerTaskReport.jrxml index 28206347c..4a83969d8 100644 --- a/navalplanner-webapp/src/main/jasper/workingProgressPerTaskReport.jrxml +++ b/navalplanner-webapp/src/main/jasper/workingProgressPerTaskReport.jrxml @@ -25,19 +25,7 @@ - <band height="167" splitType="Stretch"> - <staticText> - <reportElement style="Title" x="0" y="13" width="263" height="33"/> - <textElement verticalAlignment="Middle"/> - <text><![CDATA[Progress report]]></text> - </staticText> - <staticText> - <reportElement style="SubTitle" x="34" y="46" width="240" height="22"> - <printWhenExpression><![CDATA[new java.lang.Boolean($P{referenceDate} != null)]]></printWhenExpression> - </reportElement> - <textElement/> - <text><![CDATA[Working progress per task]]></text> - </staticText> + <band height="131" splitType="Stretch"> <image scaleImage="RealHeight"> <reportElement x="316" y="3" width="239" height="65"/> <imageExpression class="java.lang.String"><![CDATA["logos/navalpro_logo.gif"]]></imageExpression> @@ -54,11 +42,75 @@ <textElement verticalAlignment="Middle"/> <textFieldExpression class="java.util.Date"><![CDATA[$P{referenceDate}]]></textFieldExpression> </textField> - <rectangle> - <reportElement mode="Opaque" x="0" y="137" width="555" height="15" forecolor="#000000" backcolor="#E0E4FB"/> - </rectangle> <staticText> - <reportElement style="Column header" x="361" y="137" width="194" height="15"/> + <reportElement mode="Transparent" x="1" y="76" width="85" height="20" backcolor="#FFFFFF"/> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <text><![CDATA[Order:]]></text> + </staticText> + <textField> + <reportElement x="86" y="76" width="115" height="20"/> + <textElement verticalAlignment="Middle"/> + <textFieldExpression class="java.lang.String"><![CDATA[$P{orderName}]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Title" x="0" y="13" width="263" height="33"/> + <textElement verticalAlignment="Middle"/> + <text><![CDATA[Progress report]]></text> + </staticText> + <staticText> + <reportElement style="SubTitle" x="34" y="46" width="121" height="22"> + <printWhenExpression><![CDATA[new java.lang.Boolean($P{referenceDate} != null)]]></printWhenExpression> + </reportElement> + <textElement/> + <text><![CDATA[Working progress per task]]></text> + </staticText> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -66,137 +118,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -207,7 +135,7 @@ - + @@ -215,10 +143,54 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -226,13 +198,156 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -240,97 +355,50 @@ - + + + + + + + + + + + + + + + - - - + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - +