use of io.jmix.reportsui.runner.UiReportRunContext in project jmix-docs by Haulmont.
the class RunReportScreen method onUrrBtn1Click.
// end::rr-btn2-end[]
@Subscribe("urrBtn1")
protected void onUrrBtn1Click(Button.ClickEvent event) {
Report report = getReportByCode("BOOK_COUNT");
// tag::run-and-show[]
uiReportRunner.runAndShow(new UiReportRunContext(report));
// end::run-and-show[]
}
use of io.jmix.reportsui.runner.UiReportRunContext in project jmix by jmix-framework.
the class RunReportAction method runReports.
protected void runReports(Collection<Report> reports, FrameOwner screen) {
if (CollectionUtils.isNotEmpty(reports)) {
Report report = reports.iterator().next();
report = dataManager.load(Id.of(report)).fetchPlan("report.edit").one();
if (report.getInputParameters() != null && report.getInputParameters().size() > 0 || inputParametersRequiredByTemplates(report)) {
openReportParamsDialog(report, screen);
} else {
uiReportRunner.runAndShow(new UiReportRunContext(report).setInBackground(reportsClientProperties.getUseBackgroundReportProcessing()).setOriginFrameOwner(screen).setParametersDialogShowMode(ParametersDialogShowMode.NO).setParams(Collections.emptyMap()));
}
}
}
Aggregations