ReportViewer Command Syntax

The syntax for running ReportViewer from the command line is as follows:

REPORTVIEWER /SITE:"$SITE$" /RPT:<report_file_name> /CSD:MANY /OUT:DATAEXPORT /JOB:$JOBNAME$" /FMT:<format> /FILENAME:<exported_report_file_name>

where:

/SITE:"$SITE$" Specifies the current Site using its Command Launch Operation token.

/RPT:<report_file_name> Defines the source Crystal Report file, for example cpu.rpt.

/CSD:MANY Enables the Client Selection Dialog (CSD) to return multiple Clients.

/OUT:DATAEXPORT Specifies that ReportViewer is to export the report results to a file.

/JOB:"$JOBNAME$" Provides ReportViewer with the scheduled Job name.

/FMT:<format> Defines the output file format. These formats are supported:
 

Format

Description

Crystal

Crystal Report with data (default)

MSWord

Export to a Microsoft Word document

PDF

Writes an Adobe Portable Document Format file

RptDef

Exports a Crystal Report definition file (.RPT)

TAB

Writes a text file with TAB-delimited items

 

/FILENAME:<exported_report_file_name> This parameter provides a file name for the exported report. If this parameter is not specified, the report will be written to a file named on the following basis: <SITE>_<report_file_name>_YYYY_MM_DD.<EXT>, for example: VAM_CPU_2009_01_30.pdf.

Notes:

    Unless the command line specifies an alternative location in the /FILENAME parameter, exported files are written into the Generated Reports subfolder of the Vector AM Console install directory.

    If any of the command line parameters, such as the $SITE$ or $JOBNAME$ values used in scheduled operations, contain spaces, it is necessary to enclose them in "double quotes".

Related Topics

Customizing Reports

Scheduling Reports

Using Tokens in Command Launch Operations