outputName = format("%s.%s", StringUtils.substringBeforeLast(outputName, "."), finalOutputType.getId());
outputName = format("%s.%s", StringUtils.substringBeforeLast(outputName, "."), finalOutputType.getId());
throw wrapWithReportingException("An error occurred while saving result report", e); } catch (IOException e) { throw wrapWithReportingException("An error occurred while saving result report to " + outputType.getId(), e); } finally { IOUtils.closeQuietly(outputStream);
throw wrapWithReportingException("An error occurred while saving result report", e); } catch (IOException e) { throw wrapWithReportingException("An error occurred while saving result report to " + outputType.getId(), e); } finally { IOUtils.closeQuietly(outputStream);
if (document.getReportOutputType().getId().equals(CubaReportOutputType.chart.getId())) { Map<String, Object> screenParams = new HashMap<>(); screenParams.put(ShowChartController.CHART_JSON_PARAMETER, new String(document.getContent(), StandardCharsets.UTF_8)); wm.openWindow(windowInfo, OpenType.DIALOG, screenParams); } else if (document.getReportOutputType().getId().equals(CubaReportOutputType.pivot.getId())) { Map<String, Object> screenParams = ParamsMap.of( ShowPivotTableController.PIVOT_TABLE_DATA_PARAMETER, document.getContent(), wm.openWindow(windowInfo, OpenType.DIALOG, screenParams); } else if (document.getReportOutputType().getId().equals(CubaReportOutputType.table.getId())) { Map<String, Object> screenParams = new HashMap<>(); screenParams.put(ShowReportTable.TABLE_DATA_PARAMETER, document.getContent());
protected void writeTemplates(Report report, Element root) { Map<String, ReportTemplate> reportTemplates = report.getReportTemplates(); Element reportTemplatesElement = root.addElement("templates"); for (ReportTemplate reportTemplate : reportTemplates.values()) { Element reportTemplateElement = reportTemplatesElement.addElement("template"); reportTemplateElement.addAttribute("code", reportTemplate.getCode()); reportTemplateElement.addAttribute("documentName", reportTemplate.getDocumentName()); reportTemplateElement.addAttribute("documentPath", reportTemplate.getDocumentPath()); reportTemplateElement.addAttribute("outputType", reportTemplate.getOutputType().getId()); reportTemplateElement.addAttribute("outputNamePattern", reportTemplate.getOutputNamePattern()); } }
protected void writeTemplates(Report report, Element root) { Map<String, ReportTemplate> reportTemplates = report.getReportTemplates(); Element reportTemplatesElement = root.addElement("templates"); for (ReportTemplate reportTemplate : reportTemplates.values()) { Element reportTemplateElement = reportTemplatesElement.addElement("template"); reportTemplateElement.addAttribute("code", reportTemplate.getCode()); reportTemplateElement.addAttribute("documentName", reportTemplate.getDocumentName()); reportTemplateElement.addAttribute("documentPath", reportTemplate.getDocumentPath()); reportTemplateElement.addAttribute("outputType", reportTemplate.getOutputType().getId()); reportTemplateElement.addAttribute("outputNamePattern", reportTemplate.getOutputNamePattern()); } }