reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRIteration.jasper");
parameters.put("IterationName", iteration.getName());
parameters.put("IterationStartDate", iteration.getStartDate());
parameters.put("IterationEndDate", iteration.getEndDate());
} else if (object instanceof UserStory) {
UserStory story = (UserStory)object;
try {
ds = new UserStoryDataSource(story, session);
} catch (HibernateException he) {
throw new ExportException(he);
}
reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRStory.jasper");
parameters.put("StoryName", story.getName());
Person cust = story.getCustomer(); parameters.put("StoryCustomerName", (cust != null) ? cust.getName() : null);
parameters.put("StoryEstimatedHours", new java.lang.Double(story.getEstimatedHours()));
parameters.put("StoryDescription", story.getDescription());
} else if (object instanceof Task) {
Task task = (Task)object;
try {
ds = new TaskDataSource(task, session);