Class ReportTool


  • public class ReportTool
    extends Object
    Utility methods to run custom reports
    Since:
    8.7.3
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • ReportTool

        public ReportTool()
    • Method Detail

      • execute

        public Long execute​(String reportName,
                            long tenantId,
                            Map<String,​Object> parameters,
                            String sid,
                            String username)
                     throws Exception
        Executes a custom report
        Parameters:
        reportName - name of the custom report
        tenantId - identifier of the tenant
        parameters - An optional map of parameters to be used inside the report
        sid - optional identifier of the current session
        username - username the user in whose name the method is run
        Returns:
        the identifier of the output document
        Throws:
        Exception - a generic error
      • execute

        public Long execute​(long reportId,
                            Map<String,​Object> parameters,
                            String sid,
                            String username)
                     throws Exception
        Executes a custom report
        Parameters:
        reportId - identifier of the custom report
        parameters - An optional map of parameters to be used inside the report
        sid - optional identifier of the current session
        username - username the user in whose name the method is run
        Returns:
        the identifier of the output document
        Throws:
        Exception - a generic error