JReport Command Line Arguments

The following paragraphs describe the command line arguments for the JReport product family.  Please note that the setup process creates several startup batch files which may contain additional parameters.

JReport Workbench

java -Dreporthome=path -classpath path jet.report.ide.JReport -vError -vDebug -hideBrs -log[:<file>] -help

where

-Dreporthome

Specifies the directory where JReport Workbench is installed. This parameter is required.  E.g., if JReport Workbench was installed at c:\JReport, then this parameter should look like:

-Dreporthome=c:\JReport

-classpath  path

Tells the Java interpreter the classpaths. Usually append the JReport Workbench lib path to the Java classpath.  E.g., if the JReport Workbench was installed at c:\JReport and Java was installed at c:\java, then this parameter should look like:

-classpath c:\java\lib\classes.zip;c:\jreport\lib\report.zip;

-nojit

Turn off just in time compiling which sometimes creates problems.

-mx200m

Set the maximum Java heap size.

-vError

Enables JReport Workbench to output error messages to the standard error stream.

-vDebug

Enables JReport Workbench to output debug messages to standard output stream. 

-hideBrs

Prevents JReport Workbench from showing Catalog browser and Report Inspector upon opening a report.

-log[:<file>]

Tells JReport Workbench to output debug, error and other messages to the specified file.  If there is no file specified, the file Jreport.log will be used.

-help

Shows the usage of this program.

   

JReport Server

java -Dreporthome=path -classpath  path jet.server.JRServer -vDebug -vError -log[:<file>]
- help

where

-Dreporthome

Same as JReport Workbench

-classpath path

Tells the Java interpreter the classpaths. Usually append the JReport Server lib path to the Java classpath.  E.g., the JReport Server was installed at c:\JRServer and Java was installed at c:\java, then this parameter should look like:

-classpath c:\java\lib\classes.zip;c:\jrserver\lib\chart.jar;
c:\jrserver\lib\jrserver.zip;

-vDebug

Enables JReport Server to output debug messages to standard output stream. 

-vError

Enables JReport Server to output exception stack trace to standard error stream if exceptions occurs.

-log[:<file>]

Tells JReport Server to output debug, error and other messages to the specified file.  If there is no file specified, the file Jreport.log will be used.

-help

Shows the usage of this program.

 

JReport Viewer

java -classpath path  jet.client.ui.JRViewer -server<URL> -cat<catalogName> -rpt<reportName> -param<"parameterValues"> -showBrowser -vError -vDebug -log[:<fileName>] -help

where

-classpath path

Tells the Java VM the classpaths. Usually it appends the JReport Viewer lib path to the Java classpath.  E.g., the JReport Server was installed at c:\JRViewer and Java was installed at c:\java, then this option should look like:

-classpath c:\java\lib\classes.zip;c:\jrviewer\lib\jrviewer.zip;

-server<URL>

Specify the URL of JReport Server which the Viewer is going to connect.  Presently only http protocol is recognized and the URL takes the form of

http://hostname:portnumber

E.g.,  if user wants to connect to a JReport Server residing at the host called tiger using port 8888, this URL should be written like this:

-serverhttp://tiger:8888

-cat<catalogName>

Specify the catalog name which contains all the objects used in the report specified by the -rpt parameter.  The catalogName tells JReport Server runs a given report with this catalog.

-rpt<reportName>

Specify the report name the user want to run and view.

-params<"parameterValues">

Specify the parameter values used by the report specified by the -rpt parameter.  The parameterValues should be quoted by "".  If the " character is used in the parameter values, user should use "" (double qutoe) to present the " character.  The format of the parameterValues is:

parameterName1=parameterValue1, parameterName2=parameterValue2, ...

-showBrowser

Show JReport Client Viewer browser window.  If user does not specify any report to run, this option will be set automatically.  JReport Client Viewer browser is used for browsing the catalogs and reports on the server.

-vDebug

Enables JReport Server to output debug messages to standard output stream. 

-vError

Enables JReport Server to output exception stack trace to standard error stream if exceptions occurs.

-log[:<fileName>]

Tells JReport Viewer to output debug, error and other messages to the specified file.  If there is no file specified, the file Jreport.log will be used.

-help

Shows the usage of this program.

 

The following is an example command line to run JReport Client VIewer.  This example assumes that JReport Client Viewer is installled under C:\JRViewer and you are under that directory; a JReport Sevrer called JRServer using port 8888; on the server machine, there is a catalog called SunVMDemo and a report called phaseorder; the phaseorder report has two parameters, 'startdate' and 'enddate' which are date type parameters.

JRViewer -vDebug -vError -serverhttp://JRServer:8888 -catSunVMDemo.cat -rptphaseorder.cls
"-paramsstartdate=1998-05-15,enddate=1998-06-10"