Order order = Order.create();
order.setName(_("All projects"));
listWorkReportLineDTO = createEmptyWorkReportLineList(order);
}
JRDataSource dsWRL = new JRBeanCollectionDataSource(listWorkReportLineDTO);
List<CostExpenseSheetDTO> listExpenseSheetDTO = mapES.get(orderElement);
JRDataSource dsES = null;
if (listExpenseSheetDTO != null && !listExpenseSheetDTO.isEmpty()) {
dsES = new JRBeanCollectionDataSource(listExpenseSheetDTO);
}
OrderCostMasterDTO orderCostMasterDTO = new OrderCostMasterDTO(orderElement, dsWRL,
dsES);
initOrderInOrderCostMasterDTO(orderCostMasterDTO, listWorkReportLineDTO,
listExpenseSheetDTO);
listOrderCostMasterDTO.add(orderCostMasterDTO);
}
}
if (listOrderCostMasterDTO != null && !listOrderCostMasterDTO.isEmpty()) {
Collections.sort(listOrderCostMasterDTO);
return new JRBeanCollectionDataSource(listOrderCostMasterDTO);
} else {
return new JREmptyDataSource();
}
}