Online Help

Using the Reporting Module

By entering ReportCmd.exe followed by the relevant options at the command line, you can generate any report available in Alloy Discovery.

Syntax

The following string shows the command syntax:

ReportCmd.exe /Report="Report_Name" [/File="Output_File"] /Type="File_Type" /Server="SQL_Server_Name" /Database="DB_Name" {/User="Login" /Password="Password" | /WinAuth} [/AdditionalParamName1=Value1] [/AdditionalParamName2=Value2]...

There are two groups of command line options: parameters common for all the reports and additional parameters for a specific report.

The following table lists the common command-line options:

Option Description

/Report="Report_Name"

Name of the report to generate (required). You can specify the name of any report that exists in Alloy Discovery.

/File="Output_File"

Output file name. The default file name is "output". You can specify a full path name, including a drive letter or UNC path. If you provide the file name only, it will be saved to the current folder from where you have run ReportCMD.exe. A series of macros are available to specify the value of this option; for details, see Macros for output file names.

/Type="File_Type"

The output file type: PDF | EXCEL | EXCELOPENXML | WORD | WORDOPENXML | IMAGE

If absent, a PDF file is created (if the /File option does not specify a different type).

/Server="SQL_Server_Name"

SQL database server name (required)

/Database="DB_Name"

Database name (required)

/WinAuth

or

/WinAuth=True|False

Specifies whether the login is performed using Windows authentication or SQL Server authentication:

In case of /WinAuth or /WinAuth=True, the login is performed under current user account using Windows authentication. If this option is not specified or equals to False, SQL Server authentication is used.

/User="Login"

The login of the Alloy Discovery Account used to log in to the database (applicable with SQL Server authentication only).

/Password="Password"

The password of the Alloy Discovery Account used to log in to the Alloy Discovery database (applicable with SQL Server authentication only).

All the options are case-insensitive.

For details on additional parameters, which are specific for particular reports, see Additional Command-Line Parameters.

For explanation of possible error messages, see Error Messages.

Examples

The tables below contain examples of using the utility:

Command Explanation

ReportCmd.exe /type=Excel /report="User Custom Report1" /file="Z:\Reports\UCR1_%YYYY-%MM-%DD.xls" /server=server_002 /database="DB1" /WinAuth

This command generates the "User Custom Report1" report in the Excel format, with the file name containing a report date. Windows Authentication is used.

ReportCmd.exe /type=pdf /report="User Custom Report2" /file="Z:\Reports\UCR2.pdf" /Server="server_002" /Database="DB1" /WinAuth=True /StartDate="2012-01-01" /EndDate="2012-06-30" /Workstation_Names="WS_10;WS_12;WS_21"

The following command generates a UCR2.pdf file as a result of executing the "User Custom Report2" with the following values of the report-specific parameters:

  • StartDate: 2012-01-01

  • EndDate: 2012-06-30

  • Workstation_Names: WS_10, WS_12, and WS_21.

ReportCmd.exe /type=pdf /report="Custom Report 3" /file="\\db_SERVER\Reports\%ReportName.pdf" /Server="server_002" /Database="DB1" /StartDatetime="bow" /user="reporter" /password="report"

The following command generates a "Custom Report 3" report as .pdf file with the same name in the \\DB_SERVER\Reports folder. The report is generated with the date and time of the beginning of the current week passed as the value of the StartDatetime parameter and with SQL Server Authentication used for the database connection.

Batch-generating and Scheduling Reports

You can schedule the task of batch-producing reports automatically by taking the following steps:

  1. Create a command file that starts several report-generating procedures, each producing a report in the desired format.

NOTE: If you use macros in your command file (either for output file names or time range bounds), the percent marks in the macro names must be doubled.

  1. Add the task of launching that file to the Scheduled Tasks to have reports generated at regular intervals.

If your users are allowed to the Web server's restricted area, you can give them access to the most recent information from the Alloy Discovery database by sending reports to a folder on your Web server.