diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerDTO.java b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerDTO.java
new file mode 100644
index 000000000..7b0fb9445
--- /dev/null
+++ b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerDTO.java
@@ -0,0 +1,143 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.business.reports.dtos;
+
+import java.util.Date;
+import java.util.Set;
+
+import org.navalplanner.business.labels.entities.Label;
+import org.navalplanner.business.resources.entities.Worker;
+import org.navalplanner.business.workreports.entities.WorkReportLine;
+import org.navalplanner.business.workreports.valueobjects.DescriptionValue;
+
+public class HoursWorkedPerWorkerDTO {
+
+ private String workerName;
+
+ private Date date;
+
+ private Date clockStart;
+
+ private Date clockFinish;
+
+ private Integer numHours;
+
+ private String orderElementCode;
+
+ private String descriptionValues;
+
+ private String labels;
+
+ public HoursWorkedPerWorkerDTO(
+ Worker worker,
+ WorkReportLine workReportLine) {
+
+ this.workerName = worker.getName();
+ this.date = workReportLine.getDate();
+ this.clockStart = workReportLine.getClockStart();
+ this.clockFinish = workReportLine.getClockFinish();
+ this.numHours = workReportLine.getNumHours();
+ this.orderElementCode = workReportLine.getOrderElement().getCode();
+ this.descriptionValues = descriptionValuesAsString(workReportLine.getDescriptionValues());
+ this.labels = labelsAsString(workReportLine.getLabels());
+ }
+
+ private String labelsAsString(Set labels) {
+ String result = "";
+ for (Label label: labels) {
+ result = label.getType().getName() + ": " + label.getName() + ", ";
+ }
+ return (result.length() > 0) ? result.substring(0, result.length() - 2) : result;
+ }
+
+ private String descriptionValuesAsString(Set descriptionValues) {
+ String result = "";
+ for (DescriptionValue descriptionValue: descriptionValues) {
+ result = descriptionValue.getFieldName() + ": " + descriptionValue.getValue() + ", ";
+ }
+ return (result.length() > 0) ? result.substring(0, result.length() - 2) : result;
+ }
+
+ public Integer getNumHours() {
+ return numHours;
+ }
+
+ public void setNumHours(Integer numHours) {
+ this.numHours = numHours;
+ }
+
+ public Date getClockStart() {
+ return clockStart;
+ }
+
+ public void setClockStart(Date clockStart) {
+ this.clockStart = clockStart;
+ }
+
+ public Date getClockFinish() {
+ return clockFinish;
+ }
+
+ public void setClockFinish(Date clockFinish) {
+ this.clockFinish = clockFinish;
+ }
+
+ public String getWorkerName() {
+ return workerName;
+ }
+
+ public void setWorkerName(String workerName) {
+ this.workerName = workerName;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public String getOrderElementCode() {
+ return orderElementCode;
+ }
+
+ public void setOrderElementCode(String orderElementCode) {
+ this.orderElementCode = orderElementCode;
+ }
+
+ public String getDescriptionValues() {
+ return descriptionValues;
+ }
+
+ public void setDescriptionValues(String descriptionValues) {
+ this.descriptionValues = descriptionValues;
+ }
+
+ public String getLabels() {
+ return labels;
+ }
+
+ public void setLabels(String labels) {
+ this.labels = labels;
+ }
+
+}
\ No newline at end of file
diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IWorkerDAO.java b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IWorkerDAO.java
index c39dd6e40..6f8abc1c9 100644
--- a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IWorkerDAO.java
+++ b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IWorkerDAO.java
@@ -20,10 +20,12 @@
package org.navalplanner.business.resources.daos;
+import java.util.Date;
import java.util.List;
import org.navalplanner.business.common.daos.IGenericDAO;
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
+import org.navalplanner.business.reports.dtos.HoursWorkedPerWorkerDTO;
import org.navalplanner.business.resources.entities.Worker;
import org.springframework.transaction.annotation.Transactional;
@@ -66,4 +68,10 @@ public interface IWorkerDAO extends IGenericDAO {
*/
@Transactional(readOnly = true)
List getWorkers();
+
+ /**
+ *
+ */
+ List getWorkingHoursPerWorker(List workers, Date startingDate, Date endingDate);
+
}
diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/WorkerDAO.java b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/WorkerDAO.java
index b6a567b10..fd383c79a 100644
--- a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/WorkerDAO.java
+++ b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/WorkerDAO.java
@@ -20,16 +20,20 @@
package org.navalplanner.business.resources.daos;
+import java.util.Date;
import java.util.List;
import org.hibernate.Criteria;
+import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;
import org.navalplanner.business.common.daos.GenericDAOHibernate;
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
+import org.navalplanner.business.reports.dtos.HoursWorkedPerWorkerDTO;
import org.navalplanner.business.resources.entities.Worker;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
/**
* Hibernate DAO for the Worker entity.
@@ -74,4 +78,48 @@ public class WorkerDAO extends GenericDAOHibernate
"nif", containsName))).list();
}
+ @Override
+ @Transactional(readOnly = true)
+ public List getWorkingHoursPerWorker(List workers, Date startingDate, Date endingDate) {
+ String strQuery =
+ "SELECT new org.navalplanner.business.reports.dtos.HoursWorkedPerWorkerDTO(worker, wrl) " +
+ "FROM Worker worker, WorkReportLine wrl " +
+ "LEFT OUTER JOIN wrl.resource resource " +
+ "WHERE resource.id = worker.id ";
+
+ // Set date range
+ if (startingDate != null && endingDate != null) {
+ strQuery += "AND wrl.date BETWEEN :startingDate AND :endingDate ";
+ }
+ if (startingDate != null && endingDate == null) {
+ strQuery += "AND wrl.date >= :startingDate ";
+ }
+ if (startingDate == null && endingDate != null) {
+ strQuery += "AND wrl.date <= :endingDate ";
+ }
+
+ // Set workers
+ if (workers != null && !workers.isEmpty()) {
+ strQuery += "AND worker IN (:workers) ";
+ }
+
+ // Order by
+ strQuery += "ORDER BY worker.id, wrl.date";
+
+ // Set parameters
+ Query query = getSession().createQuery(strQuery);
+ if (startingDate != null) {
+ query.setParameter("startingDate", startingDate);
+ }
+ if (endingDate != null) {
+ query.setParameter("endingDate", endingDate);
+ }
+ if (workers != null && !workers.isEmpty()) {
+ query.setParameterList("workers", workers);
+ }
+
+ // Get result
+ return query.list();
+ }
+
}
diff --git a/navalplanner-webapp/pom.xml b/navalplanner-webapp/pom.xml
index 8a3f26973..89aa5f0df 100644
--- a/navalplanner-webapp/pom.xml
+++ b/navalplanner-webapp/pom.xml
@@ -37,9 +37,44 @@
+
+
+
+
+ org.codehaus.mojo
+ jasperreports-maven-plugin
+ 1.0-beta-2
+
+ ${project.build.sourceDirectory}/../jasper
+ ${project.build.sourceDirectory}/../../../target/classes
+ true
+
+
+
+
+ compile-reports
+
+ compile
+
+
+
+
+
+ jasperreports
+ jasperreports
+ 3.7.0
+
+
+
+
+
+
+ jasperreports
+ jasperreports
+
org.xnap.commons
diff --git a/navalplanner-webapp/src/main/jasper/worker_report.jrxml b/navalplanner-webapp/src/main/jasper/worker_report.jrxml
new file mode 100644
index 000000000..7abdbd359
--- /dev/null
+++ b/navalplanner-webapp/src/main/jasper/worker_report.jrxml
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java
index 98e60f098..630c85104 100644
--- a/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/common/CustomMenuController.java
@@ -241,7 +241,9 @@ public class CustomMenuController extends Div implements IMenuItemsRegister {
"02-criterios.html#id1"));
}
- topItem(_("Quality management"), "/", "", true);
+ topItem(_("Reports"), "", "",
+ subItem(_("Worker report"),
+ "/reports/worker_report.zul", ""));
}
private Vbox getRegisteredItemsInsertionPoint() {
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/ComboboxOutputFormat.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/ComboboxOutputFormat.java
new file mode 100644
index 000000000..d3b429332
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/ComboboxOutputFormat.java
@@ -0,0 +1,48 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+import org.zkoss.zk.ui.HtmlMacroComponent;
+import org.zkoss.zul.Combobox;
+import org.zkoss.zul.Comboitem;
+
+public class ComboboxOutputFormat extends HtmlMacroComponent {
+
+ private static final long serialVersionUID = 1L;
+
+ public String getOutputFormat() {
+ return getSelectedItem().getLabel().toLowerCase();
+ }
+
+ private Comboitem getSelectedItem() {
+ final Comboitem item = getCombobox().getSelectedItem();
+ return (item != null) ? item : getDefaultItem();
+ }
+
+ private Combobox getCombobox() {
+ return (Combobox) this.getFellowIfAny("combobox");
+ }
+
+ private Comboitem getDefaultItem() {
+ return getCombobox().getItemAtIndex(0);
+ }
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerController.java
new file mode 100644
index 000000000..39f507ebf
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerController.java
@@ -0,0 +1,109 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.sf.jasperreports.engine.JRDataSource;
+
+import org.navalplanner.business.resources.entities.Worker;
+import org.zkoss.zk.ui.Component;
+import org.zkoss.zk.ui.util.GenericForwardComposer;
+import org.zkoss.zkex.zul.Jasperreport;
+import org.zkoss.zul.Datebox;
+import org.zkoss.zul.Listbox;
+import org.zkoss.zul.Listitem;
+
+/**
+ *
+ * @author Diego Pino Garcia
+ *
+ */
+public class HoursWorkedPerWorkerController extends GenericForwardComposer {
+
+ private IHoursWorkedPerWorkerModel hoursWorkedPerWorkerModel;
+
+ private HoursWorkedPerWorkerReport workerReport;
+
+ private Listbox lbWorkers;
+
+ private Datebox startingDate;
+
+ private Datebox endingDate;
+
+ private ComboboxOutputFormat outputFormat;
+
+ @Override
+ public void doAfterCompose(Component comp) throws Exception {
+ super.doAfterCompose(comp);
+ comp.setVariable("controller", this, true);
+ }
+
+ public List getWorkers() {
+ return hoursWorkedPerWorkerModel.getWorkers();
+ }
+
+ public void showReport(Jasperreport report) {
+ final String type = outputFormat.getOutputFormat();
+
+ workerReport = new HoursWorkedPerWorkerReport(report);
+ workerReport.setDatasource(getDataSource());
+ workerReport.setParameters(getParameters());
+ workerReport.show(type);
+ }
+
+ private JRDataSource getDataSource() {
+ return hoursWorkedPerWorkerModel.getWorkerReport(getSelectedWorkers(), getStartingDate(), getEndingDate());
+ }
+
+ private Map getParameters() {
+ Map result = new HashMap();
+
+ result.put("startingDate", getStartingDate());
+ result.put("endingDate", getEndingDate());
+
+ return result;
+ }
+
+ private List getSelectedWorkers() {
+ List result = new ArrayList();
+
+ final Set listItems = lbWorkers.getSelectedItems();
+ for (Listitem each: listItems) {
+ result.add((Worker) each.getValue());
+ }
+ return result;
+ }
+
+ private Date getStartingDate() {
+ return startingDate.getValue();
+ }
+
+ private Date getEndingDate() {
+ return endingDate.getValue();
+ }
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerModel.java
new file mode 100644
index 000000000..ebf4deed3
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerModel.java
@@ -0,0 +1,67 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+import java.util.Date;
+import java.util.List;
+
+import net.sf.jasperreports.engine.JRDataSource;
+import net.sf.jasperreports.engine.JREmptyDataSource;
+import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
+
+import org.navalplanner.business.reports.dtos.HoursWorkedPerWorkerDTO;
+import org.navalplanner.business.resources.daos.IWorkerDAO;
+import org.navalplanner.business.resources.entities.Worker;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * Diego Pino Garcia
+ *
+ */
+@Service
+@Scope(BeanDefinition.SCOPE_PROTOTYPE)
+public class HoursWorkedPerWorkerModel implements IHoursWorkedPerWorkerModel {
+
+ @Autowired
+ private IWorkerDAO workerDAO;
+
+ @Transactional(readOnly = true)
+ public JRDataSource getWorkerReport(List workers, Date startingDate, Date endingDate) {
+ final List workingHoursPerWorkerList = workerDAO.getWorkingHoursPerWorker(workers, startingDate, endingDate);
+
+ if (workingHoursPerWorkerList != null && !workingHoursPerWorkerList.isEmpty()) {
+ return new JRBeanCollectionDataSource(workingHoursPerWorkerList);
+ } else {
+ return new JREmptyDataSource();
+ }
+ }
+
+ @Override
+ @Transactional(readOnly = true)
+ public List getWorkers() {
+ return workerDAO.getWorkers();
+ }
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerReport.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerReport.java
new file mode 100644
index 000000000..182de6abc
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/HoursWorkedPerWorkerReport.java
@@ -0,0 +1,33 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+import org.zkoss.zkex.zul.Jasperreport;
+
+
+public class HoursWorkedPerWorkerReport extends NavalplannerReport {
+
+ public HoursWorkedPerWorkerReport(Jasperreport report) {
+ report.setSrc("worker_report.jasper");
+ setReport(report);
+ }
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/IHoursWorkedPerWorkerModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/IHoursWorkedPerWorkerModel.java
new file mode 100644
index 000000000..ef7c3331f
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/IHoursWorkedPerWorkerModel.java
@@ -0,0 +1,21 @@
+package org.navalplanner.web.reports;
+
+import java.util.Date;
+import java.util.List;
+
+import net.sf.jasperreports.engine.JRDataSource;
+
+import org.navalplanner.business.resources.entities.Worker;
+
+/**
+ *
+ * @author Diego Pino Garcia
+ *
+ */
+public interface IHoursWorkedPerWorkerModel {
+
+ JRDataSource getWorkerReport(List workers, Date startingDate, Date endingDate);
+
+ List getWorkers();
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/INavalplannerReport.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/INavalplannerReport.java
new file mode 100644
index 000000000..ee61a42b3
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/INavalplannerReport.java
@@ -0,0 +1,28 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+
+public interface INavalplannerReport {
+
+ void show(String type);
+
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/NavalplannerReport.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/NavalplannerReport.java
new file mode 100644
index 000000000..e1dd7d718
--- /dev/null
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/reports/NavalplannerReport.java
@@ -0,0 +1,54 @@
+/*
+ * This file is part of ###PROJECT_NAME###
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.navalplanner.web.reports;
+
+import java.util.Map;
+
+import net.sf.jasperreports.engine.JRDataSource;
+
+import org.zkoss.zkex.zul.Jasperreport;
+
+public abstract class NavalplannerReport implements INavalplannerReport {
+
+ private Jasperreport report;
+
+ public Jasperreport getReport() {
+ return report;
+ }
+
+ public void setReport(Jasperreport report) {
+ this.report = report;
+ }
+
+ @Override
+ public void show(String type) {
+ this.report.setType(type);
+ }
+
+ public void setParameters(Map parameters) {
+ report.setParameters(parameters);
+ }
+
+ public void setDatasource(JRDataSource dataSource) {
+ report.setDatasource(dataSource);
+ }
+
+}
diff --git a/navalplanner-webapp/src/main/resources/logos/navalpro_logo.gif b/navalplanner-webapp/src/main/resources/logos/navalpro_logo.gif
new file mode 100644
index 000000000..11966e80e
Binary files /dev/null and b/navalplanner-webapp/src/main/resources/logos/navalpro_logo.gif differ
diff --git a/navalplanner-webapp/src/main/webapp/reports/combobox_output_format.zul b/navalplanner-webapp/src/main/webapp/reports/combobox_output_format.zul
new file mode 100644
index 000000000..717ae9869
--- /dev/null
+++ b/navalplanner-webapp/src/main/webapp/reports/combobox_output_format.zul
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/navalplanner-webapp/src/main/webapp/reports/worker_report.zul b/navalplanner-webapp/src/main/webapp/reports/worker_report.zul
new file mode 100644
index 000000000..a1355631d
--- /dev/null
+++ b/navalplanner-webapp/src/main/webapp/reports/worker_report.zul
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 2f4321d2e..f1ea49e9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,6 +194,12 @@
+
+
+ jasperreports
+ jasperreports
+ 3.7.0
+
org.xnap.commons