Interface ReportRunner

All Known Implementing Classes:
ReportRunnerImpl

public interface ReportRunner
Interface is used for running reports
  • Method Details

    • run

      Runs the report based on the information from the ReportRunContext. The run context may be created manually using the constructor or using the FluentReportRunner.
      Parameters:
      context - the object that contains all information required to run the report
      Returns:
      report execution result
    • byReportCode

      FluentReportRunner byReportCode(String reportCode)
      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();
       
      Parameters:
      reportCode - report code
      Returns:
      instance of FluentReportRunner
    • byReportEntity

      FluentReportRunner byReportEntity(Report report)
      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();
       
      Parameters:
      report - report entity
      Returns:
      instance of FluentReportRunner