use of io.jmix.reports.entity.JmixTableData in project jmix by jmix-framework.
the class ShowReportTableScreen method printReport.
@Subscribe("printReportBtn")
protected void printReport(Button.ClickEvent button) {
if (inputParametersFrame != null && inputParametersFrame.getReport() != null) {
ValidationErrors validationErrors = screenValidation.validateUiComponents(getWindow());
if (validationErrors.isEmpty()) {
Map<String, Object> parameters = inputParametersFrame.collectParameters();
Report report = inputParametersFrame.getReport();
if (templateCode == null || templateCode.isEmpty())
templateCode = findTableCode(report);
ReportOutputDocument reportResult = reportRunner.byReportEntity(report).withParams(parameters).withTemplateCode(templateCode).run();
JmixTableData dto = (JmixTableData) serialization.deserialize(reportResult.getContent());
drawTables(dto);
} else {
screenValidation.showValidationErrors(this, validationErrors);
}
}
}
use of io.jmix.reports.entity.JmixTableData in project jmix by jmix-framework.
the class ShowReportTableScreen method onBeforeShow.
@Subscribe
protected void onBeforeShow(BeforeShowEvent event) {
reportsDl.load();
if (report != null) {
reportSelectorBox.setVisible(false);
JmixTableData dto = (JmixTableData) serialization.deserialize(tableData);
drawTables(dto);
openReportParameters(reportParameters);
}
}
Aggregations