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 Details

    • prototypesLoader

      @Autowired protected PrototypesLoader prototypesLoader
    • reportingAPI

      @Autowired protected com.haulmont.yarg.reporting.ReportingAPI reportingAPI
    • fluentReportRunners

      @Autowired protected org.springframework.beans.factory.ObjectProvider<FluentReportRunner> fluentReportRunners
    • entityStates

      @Autowired protected EntityStates entityStates
    • dataManager

      @Autowired protected DataManager dataManager
    • reportsProperties

      @Autowired protected ReportsProperties reportsProperties
    • executionHistoryRecorder

      @Autowired protected ReportExecutionHistoryRecorder executionHistoryRecorder
    • reportsUtils

      @Autowired protected ReportsUtils reportsUtils
    • applicationContext

      @Autowired protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • ReportRunnerImpl

      public ReportRunnerImpl()
  • Method Details

    • run

      public com.haulmont.yarg.reporting.ReportOutputDocument run(ReportRunContext context)
      Description copied from interface: ReportRunner
      Runs the report based on the information from the ReportRunContext. The run context may be created manually using the constructor or using the FluentReportRunner.
      Specified by:
      run in interface ReportRunner
      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

      protected void prepareContext(ReportRunContext context)
    • getDefaultTemplate

      protected ReportTemplate getDefaultTemplate(Report report)
    • byReportCode

      public FluentReportRunner byReportCode(String reportCode)
      Description copied from interface: ReportRunner
      Creates an instance of FluentReportRunner 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();
       
      Specified by:
      byReportCode in interface ReportRunner
      Parameters:
      reportCode - report code
      Returns:
      instance of FluentReportRunner
    • byReportEntity

      public FluentReportRunner byReportEntity(Report report)
      Description copied from interface: ReportRunner
      Creates an instance of FluentReportRunner 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();
       
      Specified by:
      byReportEntity in interface ReportRunner
      Parameters:
      report - report entity
      Returns:
      instance of FluentReportRunner