Using command files to submit a job to Report Server

Document ID : KB000055891
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary

This document will discuss options available when submitting reports to a CleverPath Eureka:Reporter Server using command files.

Operating Systems

Eureka:Reporter Client (Administrator or Viewer) on WinXP, Win2000 or Win2003.
Eureka:Reporter Server on Win2000, Win2003, HP, Solaris, or AIX.

Assumptions

Report Designer or Viewer is installed on the client machine. Report Server is installed and running on the server machine.

Command Line Options

Using Eureka :Reporter Viewer, it is possible to submit jobs to the Eureka:Reporter Server via command files. This can be useful when integrating Reporter with other applications, or when trying to automate job submissions or for any other reasons where jobs cannot be submitted interactively.

The following options are used when submitting a job to a EUREKA :Reporter Server for execution.

MODE= An entry of SSVIEW, SSPRINT or SSEXPORT causes EUREKA:Reporter Viewer to submit a document to EUREKA:Reporter Server. Each corresponds to an entry on the Job Info tab of the Reporter Server Submit Job dialog box.
SSVIEWCorresponds to the output type VIEW.
SSPRINTCorresponds to the output type PRINT.
SSEXPORTCorresponds to any other output type. This is used in conjunction with EXPORT_FMT.
EXPORT_FMTSets the format for the export file to be created.
AASCII text file (*.txt).
BEUREKA:Reporter Personal Data Mart (*.iqd).
D ASCII delimited data file (*.csv).
H HTML4 file (*.htm).
h HTML2 file (*.htm)
(See Technical Document TEC342264 for information on HTML2 and HTML4 with command files)
O EUREKA:Reporter Viewer output file (*.iqo). This is the same file as is produced when you preview from a FreeForm window and then save the contents of the preview window.
TTM1 cube (*.vis).
W EUREKA:Reporter ActiveX Viewer output file (*.iqo).
X Excel work sheet (*.xls). NOT AVAILABLE WHEN
PROCESSING A DOCUMENT USING A
EUREKA:REPORTER SERVER RUNNING ON A UNIX HOST.
REPORT Report file name (*.iqr). This option is required. Filename is the report that will be printed, viewed, or exported. Include the full path unless the document is in your EUREKA:Reporter Designer directory. Always include the file extension.
OUT_FILEOutput file to create. May include a fully-qualified path. When used with SSABSOLUTE=1, it is the name and path for the output file created on the EUREKA:Reporter Server host machine.
SSABSOLUTEControls file name and location for output created on EUREKA:Reporter Server.
1Create output in the directory (on the EUREKA:Reporter Server host machine) as specified by the path and name in the argument for OUT_FILE=. When this argument is used, you should enter a fully-qualified filename for OUT_FILE=. Note that there is no warning if you specify a file that exists on the EUREKA:Reporter Server host-it will be overwritten without warning. EUREKA:Reporter Server must have write permissions for the directory you specify.
0(default) Place the output in the normal default EUREKA:Reporter Server directory.
SSHOSTThe name of the Report Server to which the job is to be submitted. The value is the name of a host as it appears in The Reporter Server Submit Job Dialog Box and must be enclosed in quotes, for instance, "Solaris IIA".
SSJOBName of the job. Displayed on the Job Info tab of the Reporter Server Submit Job dialog box. Must be surrounded by quotation marks.
SSTIMEProcessing time. Use a 24-hour clock for this entry. The default value is the current time.
SSDATEFirst processing date. The default value is the current date. (mm/dd/yyyy)
SSFREQ
O(default) Execute once only
DExecute daily
W Execute weekly
M Execute monthly
Q Execute quarterly
Y Execute yearly
SSINFINITE
1Execute infinitely. Requires an SSFREQ entry other than O
0(default) Execute according to the SSRUNS value
SSRUNSNumber of runs. Defaults to 1. Ignored if SSINFINITE=1. Requires an SSFREQ entry other than O if set to other than 1.
SSPURGE
0Do not purge
1 or greaterNumber of minutes after which the job will be purged

NOTE: You cannot use command options to submit on-demand jobs to EUREKA :Reporter Server or to submit jobs that execute every n minutes. These jobs must be submitted interactively.

Creating a Command File

To create a command file, open a text editor and type in any combination of the above options that makes sense. You must have a MODE line and the MODE line must occur first in the file. Below is an example command file:

MODE=SSEXPORT
EXPORT_FMT=H
REPORT="D:\Eureka\Reporter\Administrator\71\sample\tutor15.iqr"
OUT_FILE="C:\temp\hello.htm"
SSABSOLUTE=1
SSHOST="testbox"
SSJOB="SS_TEST"
SSTIME=14:30
SSDATE=04/05/2005
SSFREQ=Q
SSINFINITE=0
SSRUNS=5

So this command file will submit the report tutor15.iqr to the "testbox" report server for HTML output. The output will be directed to C:\temp\hello.htm on the testbox using an absolute path. The job name will be SS_TEST. It will run 5 time starting on April 5, 2005 at 2:30 and will run Quarterly.

Once you have typed the information in your text editor, save the command file as a text file. For this example we will call it test.cmd.

Executing a Command File

Now that we have a command file, we need to execute it. From a command prompt on the client machine, browse to the directory containing rptviewer.exe (C:\Eureka\Reporter\Administrator by default). Run the following command:

rptviewer.exe @C:\temp\test.cmd

Where C:\temp\test.cmd is the location and name of the command file you have created. Make sure you put a space between the rptviewer.exe and the at sign, and no space between the at sign and the path to the command file. This will open Report Viewer and submit the job to the Report Server. You will see a message that the job was successfully submitted.

We take pride in our technical documents and are interested in your feedback. Please email your comments to us directly at: portalsdksupport@ca.com
Be sure to include the document id in the message.