use of io.jmix.reports.entity.ReportTemplate in project jmix by jmix-framework.
the class ReportRunnerImpl method prepareContext.
protected void prepareContext(ReportRunContext context) {
Report report = context.getReport();
context.setReport(reportsUtils.reloadReportIfNeeded(report, "report.edit"));
ReportTemplate template = context.getReportTemplate();
if (template == null) {
template = getDefaultTemplate(report);
context.setReportTemplate(template);
}
if (!entityStates.isLoadedWithFetchPlan(template, "template.edit")) {
template = dataManager.load(Id.of(template)).fetchPlan("template.edit").one();
context.setReportTemplate(template);
}
}
Aggregations