Package io.jmix.reports.runner.impl
Class ReportRunnerImpl
java.lang.Object
io.jmix.reports.runner.impl.ReportRunnerImpl
- All Implemented Interfaces:
ReportRunner
@Component("report_ReportRunner")
public class ReportRunnerImpl
extends Object
implements ReportRunner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected DataManagerprotected EntityStatesprotected ReportExecutionHistoryRecorderprotected org.springframework.beans.factory.ObjectProvider<FluentReportRunner>protected PrototypesLoaderprotected com.haulmont.yarg.reporting.ReportingAPIprotected ReportsPropertiesprotected ReportsUtils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyReportCode(String reportCode) Creates an instance ofFluentReportRunnerfor a report with specified code.byReportEntity(Report report) Creates an instance ofFluentReportRunnerfor specified report.protected com.haulmont.yarg.reporting.ReportOutputDocumentprotected ReportTemplategetDefaultTemplate(Report report) protected voidprepareContext(ReportRunContext context) com.haulmont.yarg.reporting.ReportOutputDocumentrun(ReportRunContext context) Runs the report based on the information from theReportRunContext.
-
Field Details
-
prototypesLoader
-
reportingAPI
@Autowired protected com.haulmont.yarg.reporting.ReportingAPI reportingAPI -
fluentReportRunners
@Autowired protected org.springframework.beans.factory.ObjectProvider<FluentReportRunner> fluentReportRunners -
entityStates
-
dataManager
-
reportsProperties
-
executionHistoryRecorder
-
reportsUtils
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
ReportRunnerImpl
public ReportRunnerImpl()
-
-
Method Details
-
run
Description copied from interface:ReportRunnerRuns the report based on the information from theReportRunContext. The run context may be created manually using the constructor or using theFluentReportRunner.- Specified by:
runin interfaceReportRunner- Parameters:
context- the object that contains all information required to run the report- Returns:
- report execution result
-
createReportDocumentInternal
protected com.haulmont.yarg.reporting.ReportOutputDocument createReportDocumentInternal(ReportRunContext context) -
prepareContext
-
getDefaultTemplate
-
byReportCode
Description copied from interface:ReportRunnerCreates an instance ofFluentReportRunnerfor 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();- Specified by:
byReportCodein interfaceReportRunner- Parameters:
reportCode- report code- Returns:
- instance of
FluentReportRunner
-
byReportEntity
Description copied from interface:ReportRunnerCreates an instance ofFluentReportRunnerfor 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();- Specified by:
byReportEntityin interfaceReportRunner- Parameters:
report- report entity- Returns:
- instance of
FluentReportRunner
-