Package io.jmix.reports.runner
Interface ReportRunner
- All Known Implementing Classes:
ReportRunnerImpl
public interface ReportRunner
Interface is used for running reports
-
Method Summary
Modifier and TypeMethodDescriptionbyReportCode
(String reportCode) Creates an instance ofFluentReportRunner
for a report with specified code.byReportEntity
(Report report) Creates an instance ofFluentReportRunner
for specified report.com.haulmont.yarg.reporting.ReportOutputDocument
run
(ReportRunContext context) Runs the report based on the information from theReportRunContext
.
-
Method Details
-
run
Runs the report based on the information from theReportRunContext
. The run context may be created manually using the constructor or using theFluentReportRunner
.- Parameters:
context
- the object that contains all information required to run the report- Returns:
- report execution result
-
byReportCode
Creates an instance ofFluentReportRunner
for a report with specified code.
Usage examples:ReportRunContext context = reportRunner.byReportCode("orders-report") .withParams(paramsMap) .withOutputType(ReportOutputType.PDF) .buildContext(); ReportOutputDocument document = reportRunner.byReportCode("orders-report") .addParam("orders", ordersList) .withTemplateCode("orders-template") .run();
- Parameters:
reportCode
- report code- Returns:
- instance of
FluentReportRunner
-
byReportEntity
Creates an instance ofFluentReportRunner
for specified report.
Usage examples:ReportRunContext context = reportRunner.byReportEntity(report) .withParams(paramsMap) .withTemplateCode("orders-template") .buildContext(); ReportOutputDocument document = reportRunner.byReportEntity(report) .addParam("orders", orders) .withOutputType(ReportOutputType.PDF) .withOutputNamePattern("Orders") .run();
- Parameters:
report
- report entity- Returns:
- instance of
FluentReportRunner
-