varlena ere: Built-in Command Line Arguments


Overview

Requirements

Examples

How It Works

Design Structure

Tags

Design a Report

Variables

Built-in Arguments

Debugging

Using CSV files

Tricks

Copyright

Reports Home

ere takes several built-in command line arguments to produce help produce comma separated value files from the query output and to produce debug output. Like all other arguments to the report the built-in arguments are in the form of name=value.
debug=n
n may be 1, 2, 3 or 4. The level indicates the amount of detail you wish to see. Level 1 is enough for you to view the query or queries that were run. Level 4 is usually too much information. This argument on the command line produces a file in the current directory or $rootdir/$debugdir/ if those variables are set.

rootdir=dir
If you are running ere from a web application, your rootdir should be set to the full path of your htdocs directory. Otherwise, you may leave rootdir unset or set it to a convenient location. rootdir is used to direct the debug and csv output files to a safe location.

debugdir=dir
dir is the directory name relative to rootdir where you want your debug file files to be written. The filename will be $rootdir/$debugdir/reportname.dbg. You must be sure that the ere process can write to that directory.

csvdir=dir
dir is the directory name relative to rootdir where you want your .csv files to be written. You must be sure that the ere process can write to that directory. The filename will be $rootdir/$csvdir/reportname-nnnnn.csv. This argument is ignored if you do not also specify the command line do_csv=t and enable one or more datastreams to produce csv.

The variable with the name of your datastream will contain a link to the file. It will have the value of $csvdir/reportname-nnnnn.csv. In order to create a link from the csv file into your report, use

	<A HREF=:datastreamname:> csv file </A>

do_csv=t
Use 't' to indicate that you want .csv output from your report otherwise do not specify it at all. The .csv output is written into the current directory or into the directory specified by the value set by csvdir and/or rootdir. The datastream name is also a built in variable such that a link to the .csv file may be created in the report template.

This argument is ignored if the report's datastreams have not been defined to suport .csv output. See Tags. To enable a datastream to support csv output use csv=yes in the datastream definition:

	<DataStreamDef name=dsname ... csv=yes > 

suffix=xxx
ere looks for files with the report name ending in .xml or .ere. To change the suffix at runtime, use the suffix argument.

This is an example of a command line to invoke ere for a report called tablelist with debug set to level 1:
	% perl ere.pl tablelist debug=1 > tablelist.html
This is an example of a command line to invoke ere for a report called transfers. Debug is not set, however, copies of the data are saved in .csv format in a temporary directory. Note that this report must have been written with csv enabled for the primary datastream.
	% perl ere.pl transfers csvdir=/tmp do_csv=t > transfers.html

Copyright 2003 through 2009 A. Elein Mustain, Varlena, LLC