Running batch reports

The \reports\templates directory contains a sample template file for each type of report.

Before running any of these reports make sure you customize the corresponding template file.

In that file, named report_name.properties, you can specify:
  • The information to display in the report header.
  • How to filter the information to display the expected result.
  • The format and content of the report output.
For more information about the specific settings see the explanation provided in the template file beside each field.

If you are using DBCS characters to specify the parameters in the template .properties files, ensure you save the file in UTF-8 encoding.

After you set up the environment as it is described in Setting up for command line batch reporting, and you configured the report template file, use the following syntax to run the report:

reportcli -p report_name.property
     [-o output_report_dir]
     [-r report_output_name]
     [-k key=value ]
     [-k key=value ]
     .......

where:
-p report_name.property
Specifies the path name to the report template file.
-o output_report_dir
Specifies the output directory for the report output.
-r report_output_name
Specifies the name of the report output.
-k key=value
Specifies the value of a settings. This value override the corresponding value, if defined, in the common.properties file or in the report_name.properties file.

Examples

  1. In this example the reportcli.cmd is run with the default parameter and produces jrh1 report:
    reportcli.cmd -p D:\ReportCLI\TWSReportCli\reports\templates\jrh.properties 
    -r jrh1
  2. In this example the reportcli.cmd is run using the -k parameter to override the values set for PARAM_DateFormat in the .\config\common.properties file produces jrh1 report:
    reportcli.cmd -p D:\ReportCLI\TWSReportCli\reports\templates\jrh.properties 
    -r jrh2 -k PARAM_DateFormat=short 
  3. In this example the reportcli.cmd is run using the -k parameter to override the format specified for the report output in the PROPERTIES file produces jrh1 report:
    ./reportcli.sh -p /TWSReportCli/REPCLI/reports/templates/wwr.properties 
    -r wwr3 -k REPORT_OUTPUT_FORMAT=html -k OutputView=charts
  4. Do the following if you want to run a Custom SQL report and make available the output of the report at the following URL as http://myserver/reportoutput/report1.html:
    1. Configure the ContextRootUrl parameter in the common.properties files as follows:
      ######################################################################
      	# HTTP Server information
      	######################################################################
      
      	#Specify the context root where the report will be available
      	#To leverage this possibility it needs to specify in the report output dir
      	#the directory that is referred by your HTTP Server with this contect root
      
      	ContextRootUrl=http://myserver/reportoutput
    2. When you run a batch reports command specify as output_report_dir a directory that points to the same HTTP directory specified in the ContextRootUrl. For example, if you mapped locally the http://myserver/ as R: driver, you can run the following command:
      reportclibat 
         -p REPORT_CLI_DIR\reports\TWS\historical\templates\sql.properties 
         -r report1 
         -o R:\reportoutput
    3. As a confirmation for the successful run of the report, the following message is displayed:
      AWSBRC0106I Report available on: http://myserver/reportoutput/report1.html
      This URL shows where the report output is available.
Note: If the report is run through an HCL Workload Automation job, the output of the command is displayed in the job output.