Class ReportRunContext

java.lang.Object
io.jmix.reports.runner.ReportRunContext

public class ReportRunContext extends Object
Class stores the following information required for report running:
  • Report entity
  • ReportTemplate entity: if not specified the default template is used
  • Input parameters
  • Type of output document
  • Output name pattern

The instance of the class may be created using the constructor or using the ReportRunner bean.
Creation examples:
 ReportRunContext context = new ReportRunContext(report)
                 .addParam("customer", customer)
                 .addParam("minOrdersDate", date)
                 .setOutputNamePattern("Orders");

 ReportRunContext context = new ReportRunContext(report)
                 .setReportTemplate(template)
                 .setOutputType(ReportOutputType.PDF)
                 .setParams(paramsMap);
 
See Also: