Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JREmptyDataSource


   
    logger.info( "Gerar objeto impressao Jasper" );
    try {
     

      JasperPrint print = JasperFillManager.fillReport(relatorio, parametros, new JREmptyDataSource() );
     
      return print;
     
    } catch (JRException e) {
      e.printStackTrace();
View Full Code Here


        }
        if (listOrderCostMasterDTO != null && !listOrderCostMasterDTO.isEmpty()) {
            Collections.sort(listOrderCostMasterDTO);
            return new JRBeanCollectionDataSource(listOrderCostMasterDTO);
        } else {
            return new JREmptyDataSource();
        }
    }
View Full Code Here


         if (result != null && !result.isEmpty()) {
            return new JRBeanCollectionDataSource(result);
        } else {
            return new JREmptyDataSource();
        }
    }
View Full Code Here

                        new CompletedEstimatedHoursPerTaskDTO((Task)task, deadlineLocalDate));
        }
        if (!completedEstimatedHoursPerTaskList.isEmpty()) {
            return new JRBeanCollectionDataSource(completedEstimatedHoursPerTaskList);
        } else {
            return new JREmptyDataSource();
        }
    }
View Full Code Here

            Collections.sort(workingHoursPerWorkerList);
            setShowReportMessage(false);
            return new JRBeanCollectionDataSource(workingHoursPerWorkerList);
        } else {
            setShowReportMessage(true);
            return new JREmptyDataSource();
        }
    }
View Full Code Here

    public JRDataSource getWorkingArrangementsPerOrderReportReport(
Order order,
            TaskStatusEnum taskStatus, boolean showDependencies,
            List<Label> labels, List<Criterion> criterions) {
        if (order == null) {
            return new JREmptyDataSource();
        }

        reattachmentOrder(order);
        order.useSchedulingDataFor(scenarioManager.getCurrent());

        List<WorkingArrangementPerOrderDTO> workingArrangementPerOrderList =
            new ArrayList<WorkingArrangementPerOrderDTO>();

        reattachLabels();
        final List<Task> tasks = commonQueries.filteredTaskElements(order,
                labels, criterions);

        final List<Task> sortTasks = sortTasks(order, tasks);
        final Date deadLineOrder = order.getDeadline();
        for (Task task : sortTasks) {
            // If taskStatus is ALL, add task and calculate its real status
            if (TaskStatusEnum.ALL.equals(taskStatus)) {
                workingArrangementPerOrderList
                        .addAll(createWorkingArrangementPerOrderDTOs(
                                deadLineOrder, task,
                                calculateTaskStatus(task), showDependencies));
                continue;
            }

            // Only add task if matches selected taskStatus
            if (matchTaskStatus(task, taskStatus)) {
                workingArrangementPerOrderList
                        .addAll(createWorkingArrangementPerOrderDTOs(
                                deadLineOrder, task, taskStatus,
                                showDependencies));
            }
        }
        if (!workingArrangementPerOrderList.isEmpty()) {
            return new JRBeanCollectionDataSource(
                    workingArrangementPerOrderList);
        } else {
            return new JREmptyDataSource();
        }

    }
View Full Code Here

                    referenceLocalDate));
        }
        if (!workingHoursPerWorkerList.isEmpty()) {
            return new JRBeanCollectionDataSource(workingHoursPerWorkerList);
        } else {
            return new JREmptyDataSource();
        }
    }
View Full Code Here

                && !workingHoursPerWorkerList.isEmpty()) {
            setShowReportMessage(false);
            return new JRBeanCollectionDataSource(workingHoursPerWorkerList);
        } else {
            setShowReportMessage(true);
            return new JREmptyDataSource();
        }
    }
View Full Code Here

    protected JRDataSource getDataSource() {
        List<ProjectStatusReportDTO> dtos = projectStatusReportModel
                .getProjectStatusReportDTOs(getSelectedOrder());

        if (dtos.isEmpty()) {
            return new JREmptyDataSource();
        }

        return new JRBeanCollectionDataSource(dtos);
    }
View Full Code Here

    public JRDataSource getSchedulingProgressPerOrderReport(List<Order> orders,
            AdvanceType advanceType, Date startingDate, Date endingDate,
            LocalDate referenceDate) {

        if (orders == null || orders.isEmpty()) {
            return new JREmptyDataSource();
        }

        // Create DTOs for orders
        final List<SchedulingProgressPerOrderDTO> schedulingProgressPerOrderList =
            new ArrayList<SchedulingProgressPerOrderDTO>();
        for (Order each: orders) {
            // Filter by date
            if ((startingDate != null) && (each.getInitDate() != null)
                    && startingDate.compareTo(each.getInitDate()) > 0) {
                continue;
            }
            if ((endingDate != null) && (each.getDeadline() != null)
                    && endingDate.compareTo(each.getDeadline()) < 0) {
                continue;
            }
            // Add to list
            final List<Task> tasks = getTasks(each);
            schedulingProgressPerOrderList
                    .add(new SchedulingProgressPerOrderDTO(each, tasks,
                            advanceType, referenceDate));
        }
        if (schedulingProgressPerOrderList.isEmpty()) {
            return new JREmptyDataSource();
        }
        return new JRBeanCollectionDataSource(schedulingProgressPerOrderList);

    }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JREmptyDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.