SATREPORT Reference
S@
Home SATGUI SATSHELL SATFORM SATFILTER SATREPORT SATMYSQL License Download Examples Contact
Layout of SATREPORT Applications

The base directory for a SAT application must be defined in an exported environment variable called SATHOME. Under this directory the following directories must exist:-

$SATHOME report
Report definition files.


report

This directory contains the report definitions.

Usage

Syntax:satreport ?-r|raw? report
?-r|raw?:Output "Raw" data, not processed by SATFILTER.
report:Name of report file in $SATHOME/report directory
Example:satmysql employee

SATREPORT reads TAB delimited columns of data from standard input. By default the first row will be considered "column names", using the names=no option causes SATREPORT to see the first row as data, in which case all rows are considered to be data and the "column names" will numbered from 1 to column-count.

SATREPORT reads the variable data from standard input in the following format:

column-name1\tcolumn-name2\tcolumn-name3
data1-item1\tdata1-item2\tdata1-item3
data2-item1\tdata2-item2\tdata2-item3
data3-item1\tdata3-item2\tdata3-item3
...
...

...where \t represents a TAB character.

The column-names must not contain spaces. Although upper and lower case characters may be used, it is recommended that lower case only be used for column names, as upper case is used to identify predefined data items.

Variable Data

As described above, SATREPORT reads variable data from standard input. By default the first row will be read as "column names". Within a SATREPORT variable data is refered to by these names. The variable data may also, optionally, have its case converted in one of three ways.

Examples:

Assume the value of the column data item name is "john SMITH"

Data ItemReplaced withConversion
${name}john SMITHNone
%{name}John SmithMixed case
+{name}JOHN SMITHUpper case
-{name}john smithLower case

Predefined Data

Data ItemValue
COUNTCumulative count of data rows.
DATECurrent date in format defined by dateformat.
GROUPName of current Group.
GROUP-COUNTCumulative count of data rows for current Group.
GROUP-PAGENumber of page in current Group.
GROUP-SUM-columnCumulative sum of column for current Group.
PAGENumber of page.
SUM-columnCumulative sum of column.

Example:

Assume todays date is 23rd March 2001 and the dateformat is the default (us):

Data ItemReplaced with
${DATE}03/23/2001

Groups

The SATREPORT has a facility which allows reports to be subdivided in groups.

When grouping is enabled (group=yes), the first column of the input data is used for grouping. The input data must be sorted on the first column.

SATREPORT Definition Layout

SATREPORT definitions must have the following general layout:

<config> 
dateformat=eu|gb|us|text layout=landscape|portrait length=nn group=yes|no names=yes|no
</config>

<front>
Front page definition.
</front>

<group>
<header>
Group header definition.
</header>
<footer>
Group footer definition.
</footer>
</group>

<page>
<header>
Page header definition.
</header>
<data>
Data format definition.
</data>
<footer>
Page footer definition.
</footer>
</page>

<back>
Back page definition.
</back>
All definition sections are optional. Although, in order to produce some output, at least one should be specified!!


Copyright © 2003
Adrian Davis.