Class ReportScript


  • public final class ReportScript
    extends Object
    Easy interface to reports from scripting.
    • Constructor Detail

      • ReportScript

        public ReportScript()
        Create a new ReportScript using the implicit session (jcsSession), and the standard output stream (jcsOut).
      • ReportScript

        public ReportScript​(com.redwood.scheduler.api.model.SchedulerSession newSession,
                            Writer newWriter)
        Create a new ReportScript using a specific session and writer.
        Parameters:
        newSession - the session to use.
        newWriter - the writer to use.
    • Method Detail

      • startHTML

        public void startHTML​(String title)
                       throws IOException
        Start HTML output, emits everything up to and including the opening body tag.
        Parameters:
        title - the title.
        Throws:
        IOException - if writing fails.
      • endHTML

        public void endHTML()
                     throws IOException
        End HTML output, emits everything from and including the closing body tag.
        Throws:
        IOException - if writing fails.
      • runHTML

        public void runHTML​(String reportName)
        Run a report with HTML output.
        Parameters:
        reportName - the name of the report to run.
      • runCSV

        public void runCSV​(String reportName)
        Run a report with CSV output.
        Parameters:
        reportName - the name of the report to run.
      • runXML

        public void runXML​(String reportName)
        Run a report with XML output.
        Parameters:
        reportName - the name of the report to run.