Class UiReportRunContext

java.lang.Object
io.jmix.reportsui.runner.UiReportRunContext

public class UiReportRunContext extends Object
Class stores the information required for report running from UI. The instance of the class may be created using the constructor or using the FluentUiReportRunner bean.
In addition to options required to run a report, it is possible to control the following ones:
  • Show dialog to input the report parameters before a run or not
  • Execute report generation synchronously or in the background

Note: if a report runs in the background, the screen (or screen fragment) from which the report runs should be specified as well.
Creation examples:
  UiReportRunContext context = new UiReportRunContext(report)
                 .addParam("customers", customersList)
                 .setOutputNamePattern("Customers")
                 .setOriginFrameOwner(screen)
                 .setInBackground(true)
                 .setParametersDialogShowMode(ParametersDialogShowMode.NO);


  UiReportRunContext context = new UiReportRunContext(report)
                 .setReportTemplate(template)
                 .setOutputType(ReportOutputType.PDF)
                 .setParams(paramsMap);

  UiReportRunContext context = new UiReportRunContext(report)
                 .setOutputNamePattern("Customers")
                 .setParametersDialogShowMode(ParametersDialogShowMode.IF_REQUIRED);
 
See Also: