Summary

If Report Commander does not produce the expected results when it is run from a scheduler or other automation tool, you must save the "screen" output from Report Commander to a file so you can review it for error messages.

More Information

By default Report Commander writes output such as error messages only to the console window, where they are visible if you are running Report Commander from a command prompt. If are running Report Commander from an automation tool that output will not be visible unless you save it to a file.

There are several ways to do this.

Capture the Console Output

If your automation tool has an option to capture or save the console output ("stdout") produced by programs it runs, use that option to save the Report Commander output.

Save output to a log file

Use logging options to direct Report Commander to write information to a log file.

Using the Command Runner (adcrutil)

Beginning with Report Commander version 1.5, you can use the "-logfile" command-line option to instruction Report Commander to save all the information that is usually written to the screen to a file in addition.

To use this option, add the "-logfile" option to the Report Commander command line that you are executing from your automation tool. For example, if you are executing this:

c:\program files\arcana development\Report Commander\adcrutil.exe -report:"c:\my reports\report1.rpt" -exportformat:pdf -exportfile:"c:\report output\report1.pdf" -parameters:23 77

add the "-logfile" option as follows:

c:\program files\arcana development\Report Commander\adcrutil.exe -logfile:"c:\temp\reportcommander.log" -report:"c:\my reports\report1.rpt" -exportformat:pdf -exportfile:"c:\report output\report1.pdf" -parameters:23 77

After you run Report Commander, the "c:\temp\reportcommander.log" file will contain the output.

Note:

  1. All command-line options must come before "-parameters" or "-namedparameters" on the command line.
  2. The directory you specify for the log file must exist and must be writeable by the account that Report Commander is running under.

Using the Project Runner (adrcexec)

To configure logging when using the Project Editor and Project Runner, you can configure logging on the Project Properties panel in the Project Editor.

Alternatively, if you don't want to modify the project settings you can add the -logfile command line option when running adrcexec. For example:

adrcexec -project="c:\projects\salesreport.rcproject" -logfile="c:\logs\salesreport.log" region="East1"

Note: The directory you specify for the log file must exist and must be writeable by the account that Report Commander is running under.

Redirect output using a batch file

If you are using Report Commander 1.4 or earlier, and your automation tool does not support capturing of console output, you can redirect the console output by using the redirection operator ">" in a batch file.

For example, if you are currently having your automation tool run Report Commander directly, using this command line:

c:\program files\arcana development\Report Commander\adcrutil.exe -report:"c:\my reports\report1.rpt" -exportformat:pdf -exportfile:"c:\report output\report1.pdf" -parameters:23 77

You would instead create a batch file that contains this command:

c:\program files\arcana development\Report Commander\adcrutil.exe -report:"c:\my reports\report1.rpt" -exportformat:pdf -exportfile:"c:\report output\report1.pdf" -parameters:23 77 > c:\temp\reportcommander.log

and have your automation tool run that batch file instead. After execution the "c:\temp\reportcommander.log" file will contain the output.

Additional logging options

To get more detailed output for troubleshooting, add the "-debug" option to the command line.

See article K00000519 for additional logging and debugging information for Report Commander 2.0 and later.

Additional Potential Problems

If Report Commander appears to "hang" when run by an automation tool (i.e., it never finishes running), try running it directly from a command prompt and ensure that no evaluation mode dialog box is displayed. If so, you need to activate the software using your license, or, if you are evaluating, get a temporary license to suppress the evaluation warning. See article K00000273 for more information.