Class Reporting

java.lang.Object
io.jmix.reports.yarg.reporting.Reporting
All Implemented Interfaces:
ReportingAPI
Direct Known Subclasses:
JmixReporting

public class Reporting extends Object implements ReportingAPI
  • Field Details

  • Constructor Details

    • Reporting

      public Reporting()
  • Method Details

    • setFormatterFactory

      public void setFormatterFactory(ReportFormatterFactory formatterFactory)
    • setLoaderFactory

      public void setLoaderFactory(ReportLoaderFactory loaderFactory)
    • setDataExtractor

      public void setDataExtractor(DataExtractorImpl dataExtractor)
    • setObjectToStringConverter

      public void setObjectToStringConverter(ObjectToStringConverter objectToStringConverter)
    • runReport

      @NullMarked public ReportOutputDocument runReport(RunParams runParams, OutputStream outputStream)
      Description copied from interface: ReportingAPI
      This method generates report and put result to output stream. ! Attention : ReportOutputDocument.content field is null in this case !
      Specified by:
      runReport in interface ReportingAPI
      Parameters:
      runParams - - parameters for report printing
      outputStream - - the stream which accept binary file generated by reporting
      Returns:
      ReportOutputDocument - object which describes generated report - its name, type etc
    • runReport

      @NullMarked public ReportOutputDocument runReport(RunParams runParams)
      Description copied from interface: ReportingAPI
      This method generates report and put result to ReportOutputDocument.content field
      Specified by:
      runReport in interface ReportingAPI
      Parameters:
      runParams - - parameters for report printing
      Returns:
      ReportOutputDocument - object which describes generated report - its name, type etc
    • generateReport

      protected void generateReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String,Object> handledParams, BandData rootBand)
    • findStreamingBand

      protected @Nullable ReportBand findStreamingBand(@Nullable ReportBand band)
    • runStreamingReport

      protected @Nullable BandData runStreamingReport(Report report, ReportTemplate reportTemplate, ReportOutputType outputType, OutputStream outputStream, Map<String,Object> handledParams, ReportBand streamingBand)
      Streaming run path: small bands are extracted as usual (the streaming band excluded), then the render runs inside the streaming loader's callback, pulling the hot band's rows from a live cursor. The loader owns the transaction/connection for the whole render.

      Returns null when the formatter factory claims streaming support for the template but actually created a non-streaming formatter (a customized factory): the caller then falls back to the materialized rendering path.

    • collectReportBandNames

      protected Set<String> collectReportBandNames(ReportBand band)
    • loadBandData

      protected BandData loadBandData(Report report, Map<String,Object> handledParams)
    • handleParameters

      protected Map<String,Object> handleParameters(Report report, Map<String,Object> params)
    • logReport

      protected void logReport(String caption, Report report, Map<String,Object> params)
    • logException

      protected void logException(ReportingException e)
    • createReportOutputDocument

      protected ReportOutputDocument createReportOutputDocument(Report report, ReportOutputType outputType, String outputName, BandData rootBand)
    • resolveOutputFileName

      protected String resolveOutputFileName(RunParams runParams, BandData rootBand)