You are on page 1of 213

Report Engine Reference

Contents
Report Engine Reference ........................................................................................................................ 1
Installation .............................................................................................................................................. 7
Additional step required for Self Service with ABW 553 .................................................................... 9
Additional step required for Web Service ........................................................................................ 10
Notes ................................................................................................................................................. 11
Excelerator ............................................................................................................................................ 13
Control sheet (_control).................................................................................................................... 14
Comment ...................................................................................................................................... 14
GetData ......................................................................................................................................... 14
Group ............................................................................................................................................ 16
Break ............................................................................................................................................. 17
Mandatory .................................................................................................................................... 18
Set ................................................................................................................................................. 19
setdefault ...................................................................................................................................... 19
setnum .......................................................................................................................................... 19
setperiod ....................................................................................................................................... 20
setsqlpattern ................................................................................................................................. 20
setprompt ..................................................................................................................................... 21
Setparameter ................................................................................................................................ 22
Report sheets .................................................................................................................................... 23
Data Rows ..................................................................................................................................... 23
Placement Rows ............................................................................................................................ 38
Cosmetic rows ............................................................................................................................... 55
SQL .................................................................................................................................................... 56
Criteria .............................................................................................................................................. 57
Options .............................................................................................................................................. 59
Zero Suppress................................................................................................................................ 59
Print ............................................................................................................................................... 59
Optimized balance table query for Oracle .................................................................................... 59
Protect loaded sheets ................................................................................................................... 59
Remove control information......................................................................................................... 59
Remove printed / mailed sheets ................................................................................................... 59
Query timeout ............................................................................................................................... 59
Output Split ....................................................................................................................................... 60
output_file .................................................................................................................................... 60
output_dir ..................................................................................................................................... 60
output_title ................................................................................................................................... 60
output_author............................................................................................................................... 60
output_subject .............................................................................................................................. 60
output_password .......................................................................................................................... 60
email_to ........................................................................................................................................ 60
email_cc ........................................................................................................................................ 61
email_reserve ............................................................................................................................... 61
email_subject ................................................................................................................................ 61
email_text ..................................................................................................................................... 61
xe_excel ........................................................................................................................................ 61
Immediate mode............................................................................................................................... 62
Command Line .................................................................................................................................. 63
AGRESSO report ................................................................................................................................ 63
AGRESSO client integration............................................................................................................... 65
Appendix ........................................................................................................................................... 66
Amount types and their column names on balance tables .......................................................... 66
Column name suffixes on periodic balance tables / data warehouses ........................................ 69
Report Creator ARC ............................................................................................................................ 70
Basic Concepts .................................................................................................................................. 70
Controls ......................................................................................................................................... 70
Data Fields ..................................................................................................................................... 71
File Types....................................................................................................................................... 73
Page setup ..................................................................................................................................... 74
Page Setup Further Information ................................................................................................... 75
Titles .............................................................................................................................................. 77
Groups ........................................................................................................................................... 78
agr Object........................................................................................................................................ 79
Primary Properties and Methods.................................................................................................. 79
AGRESSO Specific Methods........................................................................................................... 99
Utility Methods ........................................................................................................................... 106
Events .............................................................................................................................................. 111
Report Events .............................................................................................................................. 111
Section Events ............................................................................................................................. 112
Portable SQL Functions ................................................................................................................... 114
$TO_CHAR ................................................................................................................................... 114
$DATE .......................................................................................................................................... 115
$IFNULL ....................................................................................................................................... 116
$NOW .......................................................................................................................................... 117
$MID............................................................................................................................................ 118
$LEFT ........................................................................................................................................... 119
$RIGHT ........................................................................................................................................ 120
$CONCAT ..................................................................................................................................... 121
$LPAD .......................................................................................................................................... 122
$MOD .......................................................................................................................................... 123
Zero Length String ....................................................................................................................... 124
Report Designer .............................................................................................................................. 125
Design Tab ................................................................................................................................... 125
Canvas Tab .................................................................................................................................. 125
Preview Tab................................................................................................................................. 125
Menus ......................................................................................................................................... 126
Toolbars and Toolboxes .............................................................................................................. 134
Report Explorer ........................................................................................................................... 139
Technical Notes ............................................................................................................................... 140
Multiple Canvases ....................................................................................................................... 141
The agr and rpt Objects .......................................................................................................... 142
Multiple SELECT Statements ....................................................................................................... 145
Multi-lingual Texts ...................................................................................................................... 146
Golden Rules ............................................................................................................................... 147
Special Parameters ............................................................................................................................. 148
Report Splitting (xs_, xw_) .............................................................................................................. 148
Document Archiving (xd_) .............................................................................................................. 150
E-mailing (xe_, xa_) ......................................................................................................................... 151
Filing (xf_)........................................................................................................................................ 153
Miscellaneous ................................................................................................................................. 154
Composite Report Files [.rerx] ............................................................................................................ 155
Data Extraction (.resql) file ............................................................................................................. 155
_data.xml ........................................................................................................................................ 155
Report File(s) ................................................................................................................................... 155
Properties........................................................................................................................................ 155
FileName ..................................................................................................................................... 155
Reporter ...................................................................................................................................... 155
Timeout ....................................................................................................................................... 155
OutputType ................................................................................................................................. 155
Report Engine SQL (ReSql) .................................................................................................................. 156
Concepts ......................................................................................................................................... 156
Grammar ......................................................................................................................................... 156
Parameter Substitution ................................................................................................................... 157
Reference ........................................................................................................................................ 157
.name .......................................................................................................................................... 157
.parserLevel ................................................................................................................................. 157
.dbtimeout .................................................................................................................................. 157
.declare........................................................................................................................................ 157
.set............................................................................................................................................... 158
.log............................................................................................................................................... 159
.* comment ................................................................................................................................. 159
.if ................................................................................................................................................. 159
.query .......................................................................................................................................... 159
.addRow ...................................................................................................................................... 160
.addFirstRow ............................................................................................................................... 160
.addRows ..................................................................................................................................... 160
.loop / .group .............................................................................................................................. 161
.relate .......................................................................................................................................... 162
.exec ............................................................................................................................................ 162
Agresso specific Select Commands ................................................................................................. 164
agr_getaddress............................................................................................................................ 164
agr_getdescription ...................................................................................................................... 164
agr_getDocument ....................................................................................................................... 164
agr_getText ................................................................................................................................. 164
agr_getSysConf ........................................................................................................................... 164
agr_getTitles ............................................................................................................................... 164
agr_getbrowser ........................................................................................................................... 165
DataSet SQL available to Reports ....................................................................................................... 167
SELECT ............................................................................................................................................. 167
Conditions ................................................................................................................................... 167
Identifiers .................................................................................................................................... 168
String Literals .............................................................................................................................. 168
Date Literals ............................................................................................................................... 168
Integer Literals ............................................................................................................................ 168
Real Number (amount) Literals ................................................................................................... 168
Boolean Literals........................................................................................................................... 168
List of Changes .................................................................................................................................... 171
8.28 build 157 ................................................................................................................................. 171
8.28 build 154 ................................................................................................................................. 172
8.28 build 151 ................................................................................................................................. 173
Report Engine (shared functionality) .......................................................................................... 173
Report Creator ............................................................................................................................ 173
Excelerator .................................................................................................................................. 173
Worderator ................................................................................................................................. 174
8.28 ................................................................................................................................................. 175
Report Engine (shared functionality) .......................................................................................... 175
Report Creator ............................................................................................................................ 176
Excelerator .................................................................................................................................. 176
Worderator ................................................................................................................................. 176
8.26 build 137 ................................................................................................................................. 177
Report Engine (shared functionality) .......................................................................................... 177
Report Creator ............................................................................................................................ 177
Excelerator .................................................................................................................................. 178
Worderator ................................................................................................................................. 178
8.26 build 124 ................................................................................................................................. 179
Report Engine (shared functionality) .......................................................................................... 179
Report Creator ............................................................................................................................ 179
Excelerator .................................................................................................................................. 179
8.26 ................................................................................................................................................. 180
Report Engine (shared functionality) .......................................................................................... 180
Export Functionality .................................................................................................................... 180
Report Creator ............................................................................................................................ 180
Excelerator .................................................................................................................................. 180
Worderator ................................................................................................................................. 181
8.25 ................................................................................................................................................. 182
8.24 ................................................................................................................................................. 185
8.23 ................................................................................................................................................. 188
8.22 build 134 ................................................................................................................................. 190
8.22 ................................................................................................................................................. 192
8.20 build 124 ................................................................................................................................. 195
8.20 ................................................................................................................................................. 197
8.16 ................................................................................................................................................. 201
8.15 ................................................................................................................................................. 203
8.14 ................................................................................................................................................. 205
8.13 ................................................................................................................................................. 207
8.12 ................................................................................................................................................. 209
8.10 ................................................................................................................................................. 210
Installation

Installation instructions for Agresso ReportEngine 8.28.

This release of ReportEngine is compatible with Agresso milestones 1, 2, 3 and 4 (including


Milestone 4 Software Update 1) and ABW 5.5.3 (update 2 and above). It is NOT compatible with any
other version of Agresso.

Important implications of installing Report Engine 8.28:

The facility to log in to Agresso from the Excel Addin or ARC Designer using the Agresso
Client type connection was withdrawn (including for users of ABW 5.5.3) at release 8.26.
Therefore it is necessary to use the "Web Service" connection which implements exactly the
same functionality.
This release of the web-service will require the installations on your client machine to be
8.25 or above. But note that it is perfectly possible to install this webservice side-by-side
with an older version rather than replacing it.
In order to consume .rerx files created using this release within Self-Service you will require
this same release to be installed on the user's client machine.

The zip file contains a copy of this document and a single msi containing all client and server
components of ReportEngine. This must be installed on ALL machines (client, business server and
web servers) on which ReportEngine is to be used.

Before installation on Web Server machines running the ABW Self-Service and/or the ReportEngine
web-service the respective web-sites should be stopped and re-started after installation is complete.
Any running instance of the Agresso Client should also be closed and any report server queue
stopped.

The client application (Excel Add-in and ARC Designer) is always installed. The msi also has a step
which interrogates the registry to find the installed location of Agresso and installs ReportEngine in
all of the following that are found on the machine:

1. The Report Server files in the Agresso\bin folder.


2. Any Centrally configured client bin folders on the machine.
3. The ReportEngine web-service (if present)
4. The Self-Service Application (if present)

This step is carried out by the program named AgrxlInstall.exe. It always creates a log file with a
name like - AgrxlInstall.log in the current TEMP folder.
If, for any reason, your copy of Agresso was not installed in the normal way i.e. by the main Agresso
msi (e.g. a web server machine which does not have an installed copy of Agresso). You will need to
re-run AgrxlInstall from the command line supplying the path of the installation target as follows.
DO NOT copy any of the files located under the ServerFiles folder by hand.

To install ReportEngine only in the named Agresso bin folder:

AgrxlInstall "C:\program files\Agresso 5.6\bin"

To install ReportEngine only in the named Agresso Self Service folder:

AgrxlInstall "C:\program files\Agresso 5.6\Self Service"

To install ReportEngine only in the named Agresso Web Service:

AgrxlInstall "C:\program files\Agresso 5.6\Web Services\ReportEngine"


Additional step required for Self Service with ABW 553

For Agresso 553 only the following line is required in the httpmodules section or the Self-Service
web.config file:

<add name="ReportEnginePostFix" type="Agresso.ReportEngine.Web.PostFixModule,


Agresso.ReportEngine" />

If there is no such section then you will need to add one like this:
<httpModules>

<add name="ReportEnginePostFix" type="Agresso.ReportEngine.Web.PostFixModule,


Agresso.ReportEngine" />

</httpModules>
Additional step required for Web Service

If this is a new installation, once you have run the installation you will need to go into the Agresso
Management Console and create the ReportEngine web-service in the normal way.

The AMC will allow you to test the webservice by opening the test page (view test node). Click the
A_Test link to test a complete webservice connection. The resulting message should indicate any
problems or confirm that the webservice is correctly installed.
Notes

Note 1:

This version of the ReportEngine web service will ONLY support 8.25 and 8.26 clients so this implies
that all clients connecting via the web-service will need to be upgraded at least to 8.25 and
preferably to 8.26. (This has been done to ensure proper security).

Note 2:

In order to use Post Back over the web-service connection it is necessary to add the following key in
the AppSettings section of the web service web.config file.

<add key="AllowPostBack" value="true" />

Note 3:

There is a bug in some versions of the Management Console which causes the ReportEngine web
service virtual folder to be marked for Directory browsing. This option should be unchecked by
hand.

Note 4:

The parameters ACT_CL_LEVEL and ACT_TG_LEVEL should be enabled by setting the value to 0 or
greater. However, this is the default so no action is usually necessary.

Note 5:

There is no need to remove or uninstall any copy of ReportEngine 7.x as 7.x and 8.x can co-exist
without problem).

Note 6:

If interactions with the web-service are unusually large (> 4MegaBytes) or unusually long-running (>
90 seconds) then it may be necessary to edit the ReportEngine web service web.config file and
uncomment the httpRuntime section so that appropriate values can be set for the executionTimeout
and maxRequestLength settings.

Note 7:
It is important to make sure that the Check for publishers certificate revocation flag is NOT
checked in Internet Explorer>Internet Options>Advanced (see below). Otherwise every time that a
signed dll is loaded the operating system will try to talk to Verisign over the internet to validate that
the certificate has not been revoked. ReportEngine and the Agresso platform contain many dlls all
of which are signed so this can introduce a very serious delay (up to several minutes) when the
application is started.

This setting is held on a per-user basis and will need to be disabled for the Business Server and Web
Service users as well as regular client users. The easiest way to achieve this is via the following
command:

AgrxlInstall revocation /disable


Excelerator

AGRESSO Excelerator is a report writer primarily aimed at producing the month-end management
reports from AGRESSO. It achieves this by downloading data from the AGRESSO database into
Microsoft Excel which is used to format and present the information. Functionally it is more similar
to the traditional GL report writers that existed in some of the older accounting packages on the
market than it is to the SQL based reporting tools (like AGRESSO Report Writer, AGRESSO Report
Creator or Crystal Reports) that are commonplace in the market today.

The functional difference is very important but perhaps difficult to understand until one has actually
been presented with the problem of producing the sort of balance sheet or P&L analysis report that
is usually required for the month end management report pack.

Tools like AGRESSO Report Creator, Crystal Reports, AGRESSO Report Writer, MS ACCESS, Business Objects, etc are
all SQL based (irrespective of whether you have to write the SQL yourself or if it is generated for you). That is to say that
they are all based on the premise that you wish to print one line, group of lines or page on the report for each row returned
from an SQL SELECT statement. This is not the case with Excelerator. Excelerator is based on the premise that you wish
to specify that on a particular line in the report you want to show data summarized or pertaining to a particular range of
accounts (or some other attribute(s)). This is exactly the case that occurs in the management report pack.

AGRESSO Excelerator addresses the following sorts of issue that arise when producing a P&L analysis
or similar report. It does this either directly within the product or by leaning on standard features of
Microsoft Excel.

Asymmetric totalling (e.g. high level summary of income, detailed breakdown of


expenses)
Sign reversal on a line by line basis (e.g. income reversed, expenditure not reversed)
Selection of data based on more than one attribute (for example account and sub-
account)
Data from a number of different sources (e.g. head count for a division interspersed
between rows of financial data)
Footnotes showing the detail that goes into a particular line at a later point in the report
Calculated rows (e.g. % profit as well as sums, for example total profit).
Calculated columns showing row value as a percentage of the total value.
Cross tabs (e.g. P&L by cost centre)
Cross tabs by user specified ranges (e.g. revenue by specified ranges of periods)

A very important point to note is that AGRESSO Excelerator is not in any sense a substitute for a row
based enquiry tool or report writer. For example it does not address ad-hoc enquiries like the
AGRESSO Browser or balance table enquiries. Nor is it the best tool for laying out the printed page
for printing on pre-printed stationary (obvious examples of this would be invoices, statements,
cheques and remittances, etc).
Control sheet (_control)
Then control sheet (_control) controls the loading of the rest of the worksheets in the workbook. It
allows you to define parameters and should contain a list of the worksheets to be loaded. Like the
worksheets to be loaded, processing of the _control sheet is determined by the contents of column
A.

The presence of the _control sheet is not mandatory for simple reports.

A template _control sheet can be created from dialog: AGRESSO Excelerator, Options, Tools, Make
Example Control Sheet.

Control Sheet Row Types:

Comment
Column A

* Any row with an asterix (*) as the first non-space character in column A will be ignored. As will any
row with column A left blank.

GetData

Column A ColumnB

getdata template_name, report_name, param1=value1 [,param2 = value2] ...

This command is for use only when "SQL Parser" is set to "DataSet" in the "Options" dialog. It
allows the user to retrieve the dataset that will drive the report from the ReportEngine web-service.

Reportengine will look for the named browser template. If the template does not exist or the user
does not have access to it or if it returns no rows then processing will stop with a security exception.
It will then look for a report of the specified name that has been imported against the given browser
template. If it is found then the ".resql" file within the ".rerx" file will be run and the resulting
DataSet will be returned and will be available for loading the report.
Sheet

Column A Column Column C Column Column E


B D

Sheet[,noblanks][,nooverwrite] sheet template paramet Insert


[itteration] name name ers strings

noblanks Indicates that sheets in which no query returns any data should be skipped.
nooverwrite Indicates that sheets in which output_dir \ output_file points to an existing file should be skipped.
sheet name This is the name of sheet to be processed.
itteration If this is specified, the sheet will be loaded from a template multiple times in which case template
name is mandatory and sheet name should contain a parameter.
Itteration can be:
attribute attribute client
which will cause the sheet to be loaded once for each value of the attribute attribute that is defined
for the AGRESSO client (company) client.

Excel sheetname
This will cause the sheet to be loaded once for each row in the specified Excel sheet (which must
be in the same workbook). The format of such a spread sheet is the same as when a spreadsheet
is used as the source for a query. This includes column names in row 1, data in row 2, onwards.

A valid SQL SELECT sentence which will cause the sheet to be loaded once for each row returned
from the select sentence with local parameters set for each column returned from the select
sentence.

template name This is the name of template sheet from which sheet is to be produced. If left blank, it is assumed
that the sheet named in column 2 already exists.

parameters These are local parameters to be applied to this sheet with a format like:
LocalParameter1=Value1, LocalParameter2=Value2,
insert strings This is a string containing values to be inserted into specified cells on the spreadsheet with a format
like:
Range1=Value1, Range2=Value2,

Values used in both parameters and insert strings may themselves refer to earlier defined local or
global parameters simply by referring to the parameter enclosed in angle brackets. For example (in
insert strings):-
B2=Period <period>
meaning that the value of the parameter Period should be inserted into cell B2 prefixed by the word
Period.
Group
Causes all sheets specified within the group to be loaded for each row returned by iteration

Column A Column B Column C Column D Column E

group [,noblanks] group paramete


iteration name rs

sheet sheet template Insert


name name strings

sheet sheet template Insert


name name strings

sheet sheet template Insert


name name strings

endgroup

noblanks indicates that sheets in which no query returns any data should be skipped
group name is a name for the group that will appear in the "Select Sheets dialog.
Break
A break row is always used in conjunction with a Group row and causes the sheets within the group
to be loaded for each value of column encountered in the data rather than for each row in the data.
If the Query control syntax is used within a report sheet within the group then the data for the
current value of column will be available.

Column A Column B Column C Column D Column E

group [,noblanks] group paramete


iteration name rs

break column

sheet sheet template Insert


name name strings

sheet sheet template Insert


name name strings

sheet sheet template Insert


name name strings

endgroup
Mandatory
Column A Column B

mandatory parameter

Causes an error if parameter is non-existent or is equal to a zero length string. This is useful in
combination with setprompt to prevent the situation where a very long running query would
otherwise be generated.
Set
Column A Column B Column C

set parameter value

sets parameter to given value.

Value may itself contain references to previously defined parameters. Here as elsewhere this is done
by prefixing the name of the parameter with a less than sign < and suffixing it with a greater than
sign >. Example: If you have a parameter named period then you would refer to it as <period>.

setdefault
Column A Column B Column C

setdefault parameter value

If parameter is not already defined sets parameter to given value.

If parameter is already defined it has no effect.

Value may itself contain references to previously defined parameters. Here as elsewhere this is done
by prefixing the name of the parameter with a less than sign < and suffixing it with a greater than
sign >. Example: If you have a parameter named period then you would refer to it as <period>.

setnum
Column A Column B Column C

setnum parameter expression

sets parameter to the value of numeric expression which takes the form:

operand1 operator operand2


where operands 1 and 2 are numbers and operator is one of +, -, *, / or \.
(backslash (\) signifies integer divide, useful for obtaining year from period
199709 \ 100 = 1997) for example:

Column A Column B Column C

setnum year <period> \ 100


setperiod
Column A Column B Column C

setperiod parameter expression

sets parameter to the value of period expression which takes the form:

period1 operator period2 [, periods per year]


where period1 and period2 are valid AGRESSO accounting periods and operator is either
+ or -. The periods are added or subtracted modulo periods per year.
If periods per year is not specified it defaults to 12. For example:

Column A Column B Column C

setperiod period1 <period> - 1

setperiod period2 <period1> - 1

setsqlpattern
Column A Column B Column C

setsqlpattern parameter value

sets parameter to the value of value substituting SQL pattern matching characters for the
corresponding regular expression characters.

Example: * is replaced with % which matches zero or more characters

and ? is replaced by _ which matches any single character.

This is useful when running as an AGRESSO report or server process so that wildcards (usually a *)
entered by the user in the report ordering window in the normal fashion can be converted to the
corresponding characters to be used in an SQL statement.

For example:

Column A Column B Column C

setsqlpattern costc *

Results in the parameter costc being set to the value %.


setprompt
Column A Column B Column C

setprompt parameter value

prompts for a value for parameter using value as a default.

Value may itself contain references to previously defined parameters. Here as elsewhere this is done
by prefixing the name of the parameter with a less than sign < and suffixing it with a greater than
sign >. Example: If you have a parameter named period then you would refer to it as <period>.
Setparameter
Column A Column B

setparameter sql

Causes the given sql sentence to be executed and will make the results available as parameters.
Note. The SQL should return only one row, if more rows are returned this will be treated as an error
that will cause the loading of the sheet to terminate.
Report sheets
Loading of data into the spreadsheet is controlled by the contents of Column A. The program will
ignore any row in which column A is empty.

The format of the contents of the control column is as follows:


type, keyword1, keyword2 Value

Commas separate the row type and keywords and the value (if specified) is separated from the last
keyword by one or more spaces.

The various row types are logically grouped according to their functionality and when they are
processed.

Data Rows
Data Rows define where the data for the report is to come from:

Query balance
Format:
query [, query number] balance ID client [period] [language]

ID is the ID of the balance table within AGRESSO.

client is the AGRESSO client (or company).

period if given specifies that the data is to come from a periodic balance table for the specified
accounting period.

language is the AGRESSO language code (defaults to EN for English).

For this type of query AGRESSO Excelerator looks at all the columns that are referred to on the
columns row as well as any crosstab row etc and constructs the required SQL to retrieve the data. Valid
columns are:

Attributes referred to by name.


Attribute descriptions referred to by the name of the attribute with the suffix _text.
For non periodic balance tables
Period, the accounting period
Amounts, see Amount column names
For periodic balance tables
Amounts as above suffixed by appropriate suffixes.
It is possible to refer by name to any AGRESSO attribute which is either posted on the balance table
or related to one that is.

In a consolidated balance table the client attribute column can be referred to as dim_client. This is to
avoid a conflict with the client column that always exists in the balance table and will refer to the
head office client.

The data retrieved from the balance table can be controlled by the rows relation, sort and where which
apply only to this type of query.
Query excel
Format:
query [, query number] excel worksheet_name|range_name
The worksheet given should contain column names in row 1 and data in the following rows (as
would be returned by Get External Data).
query SELECT ...
Format:
query [, query number] SELECT ...
query AGRESSO
Format:
query [, query number] agresso [template name]

This causes Excelerator to take the data that it is given by AGRESSO, either the output of an *.arw
report or the contents of a browser window.

If the template name is supplied then the data comes from running the browser template via the
Query Engine. This means user group security will be respected.

If working in immediate mode then the data will be read from a sheet named _data that is written
by Excelerator when a new report is generated from AGRESSO. This enables you to work on the
design of the report off-line.
Query control
Format:
query [, query number] control
Where row
Applies to balance table and Excel type queries only.

Column A syntax:

where [, query number] column criteria

Causes the balance table query to return only rows where column matches criteria. Note criteria are
to be specified as in code columns or cross tab rows and not as in an SQL WHERE clause.
NoZeros row
Applies to balance table type queries only.

Column A syntax:

nozeros [, query number]

Causes rows returned from a balance table query to be ignored if all value columns are zero.
Sort row
Applies to Balance Table, AGRESSO and Excel type queries only.

Column A syntax:

sort [, query number] column [desc] [, [column [desc]], ]

Causes the rows returned from the balance table query to be sorted by the specified columns. The
desc keyword can be used to specify that the sort should be in descending order.
Datasource row
Applies to SQL type queries only.

Column A syntax:
datasource [, query number] datasource

Specifies that this SQL query should be run against the specified secondary data source rather than
the current primary data source.

Note

All secondary datasource connections are made using and ODBC or DataCache connection
The specified data source must be recognized by Excelerator and, if running on the report server, require no
user interaction (for example must not prompt for a password) otherwise an error will occur.
If the primary datasource is also of type ADO then this is still defined by the parameter datasource.

Example:

query select shipperid, companyname, phone from shippers order by shipperid

datasource
northwind

columns text shipperid text companyname text phone

detail

This will open a connection to the northwind data source (A sample database shipped with MS
Access and SQL Server) and run the specified query. Any number of queries such as this could appear
on the same sheet or workbook as other queries running against the main AGRESSO database.
Relation row
Applies to balance table type queries only.

Column A syntax:

relation [, query number] column1 , column2 [, column3 ]

Tells AGRESSO Excelerator that column1 is a relation on column2 which is a relation on column3 etc.
The last specified column must be a posted attribute on the balance table or a related attribute that
has been defined by an earlier relation row.
Tree row
Applies to balance table type queries only.

Column A syntax:

tree [, query number] tree name

Tells Excelerator that the named tree should be included in a balance table query. The columns
named in the tree can then be used in the query simply by naming them.

Note:
If the tree name contains commas then it should be surrounded by single quotes. For example: tree
account, costc and project tree.
SQL rows
Column A syntax:

sql [fragment of sql sentence]

This provides a way of entering an SQL statement, 256 characters long to be used in a subsequent
query row. All the values against all SQL lines are concatenated together and used in the next query
line. For example:

sql SELECT dim1, amount


sql FROM aglaggadp_<period>
sql WHERE client = '<client>'
query
SetParameter row
Column A syntax:

setparameter [sql sentence]

Causes the given SQL sentence to be executed and will make the results available as parameters.

Note The SQL should return only one row, if more rows are returned this will be treated as an error
that will cause the loading of the sheet to terminate.
Set row
Column A syntax:

set parameter=value
setnum parameter=expression
setperiod parameter=expression
setdefault parameter=expression
setsqlpattern parameter=expression
setprompt parameter=default

Sets the specified parameter to the specified value. Parameters defined in this way within the report
sheet are local and active only the current sheet. For a description of valid expressions please see
help on corresponding _control sheet rows.
Placement Rows
Placement Rows define where the data from the query is to be put within the Excel worksheet
Columns row
Column A syntax:

columns [, query number]

The rest of the cells in the row should contain the names of the columns returned from the query to
be inserted into summary, group or detail rows.

Syntax for other columns:


code column
text column
concat column
value column
default value
column

If the name of the column is prefixed by the word code then this is taken to be a code that will be
constrained to the values specified in the individual summary or detail rows. Code columns are
hidden in the processed spreadsheet.

If the name of the column is prefixed by the word text then this column will be treated as text even if
the contents and data type are numeric (so that sign reversal will not be applied).

If the name of the column is prefixed by the word concat then this column will be treated in the same
way as if it were prefixed with text except that strings will be concatenated together from all rows
matching the criteria in summary rows (rather than returning the first non-blank value). The default
delimiter is a single space but this can be overridden by specifying a delimiter (zero or more
characters) concat':' project.

The "default" keyword signifies that the corresponding value should be inserted into cells in this
column in all active rows. This is very useful for columns into which the user is going to be asked to
enter data.

If the name of the column is not prefixed or prefixed by the word value then this is a value that will
be summed etc.

For balance table type queries each column must either be the name of an amount column on the
balance table, or the name of a posted or related attribute. Attribute names may be suffixed with
_tex meaning that the description of the attribute should be shown rather than the attribute value
itself.

For backwards compatibility, if a columns row is not specified for a given query then the column
definitions will be taken from the rest or the cells on the query row.
Crosstab row
This row allows the setup of a crosstab.

Column A syntax:
crosstab [,query number] [column]

Value column syntax:


[criteria] see Criteria

column is the name of a column in the query that is used to select records on a column by column
basis. In value columns of the query the selection criteria for the column is inserted.

Example:

query.. amount amou amou amount amou


nt nt nt

crosstab 0000- 9606 9607 9608-


period 9605 9999

This will cause the amount for the specified periods to be entered in each column. The last column
where no criteria is entered will show the total amount for all periods.

It is possible to have more than one crosstab row per query in which case there is an implied AND of
the criteria on the 2 (or more) crosstab rows
Round row
Allows you to specify the level of rounding that should be applied either to all columns or to particular columns. If no number
of decimals is specified against a particular column then the number of decimals supplied in column A is used, if no number
is supplied in column A then the default is zero. This means that data will be rounded to the nearest whole number.
Note. This rounding is applied as the data is inserted into Excel so that totals shown are the exact sum of the displayed
figures.

Column A syntax:
round [,query number] [number of decimals]

Value column syntax:


[number of decimals]
Unit row
Allows you to specify the base unit for display of the data so that the data can be shown in
thousands for example. If no unit is specified against a particular column then unit supplied in
column A is used. Effectively this row causes all the data to be divided by the number given as unit.

Column A syntax:
unit [,query number] unit

Value column syntax:


[unit]
ColumnSign row
You can specify sign reversal on a column by column basis.

Column A syntax:
columnsign [,query number]

Value column syntax:


[flag]

flag should be set to blank, n, or no to indicate that sign reversal should not take place for this
column. Set it to y or yes to cause the column to have sign reversal applied.
Summary rows
Column A syntax:
{summary | sum} [, query number] [,hidden] [,{sign | -}]

Code column syntax:


[criteria] see Criteria

This row will be loaded with the sums of all the specified columns for all rows in the underlying
query which satisfy criteria specified in the code column(s).

If the hidden keyword is specified then the row will always be hidden in the loaded sheet
irrespective of the setting of the option Zero Suppress.

If the sign or - keyword is specified then sign reversal will be applied to data loaded by this row.
Subtotal row
Column A syntax:
subtotal [, query number] [,outline[n]] column1 [, column2 [,]]

This row type provides the classic break-pointed subtotalled report functionality similar to that
found in Crystal or ARW.

The modifier Outline modifier causes Excelerator to create an Excel Outline Grouping corresponding
to the loaded data. The initial level of the outline that is displayed can be set by suffixing the outline
keyword with the initial level. For instance, outline1 causes the structure to be collapsed to the top
level. The default is level 2 if no level is specified.
Header row
Column A syntax:
header [, query number] [,page] [,merge] [column]

This row type is valid only in conjunction with a Subtotal row and defines a row to be inserted before
every new value of column encountered in the data.

The modifier Page causes a page break to be inserted before the header row in the loaded report.

The modifier Merge causes the header to be merged with the first row of data.

The parameter substitution automatically occurs in header rows. The $sum etc keywords may also be
used in the header row (see description in Footer row) to give a sum of the data that follows.

Header rows may be followed by one or more Continuation rows


Footer Row
Column A syntax:
footer [, query number] [column]

footer rows may be followed by one or more Continuation rows

This row type is valid only in conjunction with a Subtotal row and defines a row to be inserted after
every time the value of column changes in the data.

The parameter substitution automatically occurs in footer rows.

By default an Excel SUBTOTAL function is inserted beneath every value column.

If one of the following keywords is placed in a cell in the footer row (or any following continuation
rows) then an Excel SUBTOTAL of the corresponding type will be inserted.

$average
$count
$counta
$max
$min
$product
$stdev
$stdevp
$sum
$var
$varp
Continuation row
Column A syntax:
+

a single + character in column A signifies a continuation row.

Continuation rows are valid only following Header rows, Footer rows or other continuation rows.
Detail row
Column A syntax:
{detail | det} [, query number] [,{sign | - }]

Code column syntax:


[criteria] see Criteria

This will cause a row to be inserted into the spreadsheet for each row in the underlying query that
satisfies the criteria specified in the code column(s).

If the sign or - keyword is specified then sign reversal will be applied to data loaded by this row.
Group row
Column A syntax:
group [, query number] ] [,{sign | - }] column [, column]

Code column syntax:


[criteria] see Criteria

This will cause a row to be inserted into the spreadsheet for each unique value of the specified
column. Thus, it would have the same effect as specifying a summary row for each existing value of
the specified column that meets the criteria specified in the code columns

If the sign or - keyword is specified then sign reversal will be applied to data loaded by this row.

If the group row is contained within a subtotal structure then the columns list on the Subtotal row is
implicitly pre-pended to the columns list on the group row unless they are already explicitly
included.
Range row
Column A syntax:
range [,query number]

Code column syntax:


[criteria] see Criteria

This simply allows specification of criteria in the code column(s) to be OR'ed with the criteria in the
next summary or detail row. Multiple range rows may be used.
Extract row
Column A syntax:
extract [,query number] [sheetname]

This has no effect on the sheet being loaded but causes a copy of all the data returned by the
current or specified query to be written to a separate sheet.

If sheetname is not specified a new sheet is created.

If sheetname is specified and no sheet of that name already exists then it is created.

If sheetname is specified and a sheet of that name already exists then it will be overwritten if and only
if the existing sheet is a previous copy of the same data set.

This is very useful for development purposes as it allows the possibility of continuing to develop or
debug the report off-line.

Syntax 2
extract [,query number] word [filename]

Takes the data from the current query and makes it available to a new MS Word document as a mail
merge data source. This means it offers the same functionality that is available from within the
AGRESSO 54 client.
Break row
Column A syntax:
break [,query number] column [sheetname]

A break row causes a separate output sheet named sheetname to be created for each value of column
encountered within the data of the query. Note sheetname should contain a parameter that will
differ for each value of column (usually column itself) for example to produce a profit and loss report
for each division:-

break division P&L <division>

If sheetname is omitted then a default name is generated for the output sheets.

Within the output sheets the data in the query containing the break will be constrained to include
only those rows for the current value of the break column. So that in our example P&L 42 will only
see data for division 42.

The use of a break row within a report sheet is functionally very similar to using a break row within a
group on the _control sheet but is more concise.

Only one break row is allowed per sheet.

Break rows are now allowed within a sheet that is already within a group on the _control sheet
Cosmetic rows

Parameter row
Column A syntax:
parameter

Has no effect except to cause parameters to be substituted in cells in this row

PreParameter row
Column A syntax:
preparameter

Has the same effect as a parameter row i.e. that all parameters in all cells in this row will be
substituted. The difference is that preparameter rows are processed before anything else and after
they are processed the sheet is recalculated and processing of the sheet recommences. This is so
that the value of a parameter can be made available to be used in Excel Formulae early enough to
affect the subsequent processing of the sheet.

Comment rows
Any row with an * as the first non-blank character in column A is treated and a comment. Such rows
are hidden when the sheet is loaded (un-hidden when the sheet is unloaded) but otherwise have no
effect.

Hide row
Column A syntax:
hide

Any columns containing anything other than blank or "0" in this row will be hidden after the sheet
has been loaded. This may be parameterized in the normal way so that columns may be hidden or
left visible according to the current values of parameters or data fields.

Note: there may only be a single "hide" row for the whole sheet as the entire columns will be hidden
for the entire sheet not for any particular query.
SQL
Anywhere where it is valid to enter an SQL sentence the following rules apply:

The SQL sentence must always return a recordset. This means it must usually be a SELECT statement.

You can use the portable SQL functions provided by ReportEngine that will function whatever the
database connection type against both SQL Server and Oracle. These functions all begin with a "$"
and are documented separately.

The SQL sentence may be prefixed by DB (i.e. DBSELECT .) to prevent any pre-parsing of the SQL by
AGRESSO.

The SQL sentence must begin with SELECT or be prefixed by the EXEC keyword. The EXEC keyword
exists to allow the possibility of running a stored procedure but this procedure must return a
recordset. The EXEC keyword is only valid when running as a report or server process on the
AGRESSO report server, it will cause an error if running in immediate mode or from the AGRESSO
Client. This is a deliberate restriction to avoid the possibility of updating the database.
Criteria
Anywhere where criteria are specified the format is as follows:
[not] expression [;expression [;expression ]]

where semicolons represent a logical OR and the not keyword inverts the sense of the entire criteria
string.

each expression can have one of the following forms:

a simple value

value

a range of values
value1-value2

to refer to a simple value containing a hyphen it is possible to quote values like this:

"aaa-bbb"

an inequality
< value meaning less than value
> value meaning greater than value
<= value meaning less than or equal to value
>= value meaning greater than or equal to value

an expression containing wildcards


* matches any string of zero or more characters
? matches any single character
# matches any numeric character (0-9)
[list] matches any single character from list
[!list] matches any single character not from list
[a-c] matches any single character in range a to c
[a-cA-C] matches any single character in range a to c or in range A to C

the keyword blank to mean all rows for which the specified column is blank (zero length string)

the keyword null to mean all rows for which the specified column is null
the keyword else to mean all rows that have not yet been included in any other selection

the keywords ref=n or ref>n or ref<n to mean all rows referenced exactly n times, more than n times
or less then n times. (ref=0 is equivalent to else).

an empty string or * to mean all rows.


Options
These are the options:

Zero Suppress
Causes summary rows where no matching rows are found in the data to be hidden.

Print
Causes each sheet to be printed after it has been loaded. Applies to immediate mode only.

Optimized balance table query for Oracle


Causes Excelerator to generate the balance table SQL in a manner that is optimized for Oracle. (With
recent releases of Oracle this no longer makes much difference)

Protect loaded sheets


Causes sheets loaded by Excelerator to be protected. If a parameter named Password exists this will
be applied, otherwise the sheet will be protected without a password.

Remove control information


Causes Excelerator to remove rather than hide the control information in loaded sheets. This
includes column A, code columns and rows containing instructions to Excelerator.

This option only has an effect when loading a copy of the original sheet.

Remove printed / mailed sheets


Causes sheets that have been printed, emailed or saved to a separate worksheet to be deleted from
the original workbook. Useful to prevent the workbook from becoming very large and creating a
performance problem.

Query timeout
Applies the specified timeout (in seconds) to the database connection. If a value of 0 or a negative
number is given then no timeout will be active.

Note:
This is not respected by all database/middleware combinations.
Output Split
The output of Excelerator reports can be split into separate files (workbooks) and either emailed to
separate recipients or saved in separate locations (or both). The output can also be saved as HTML
(requires Excel 2000 or higher) or MHTML (requires Excel 2002 or higher). It is perfectly possible to
request that the output is split to Email and to Documents.

Excelerator buffers the loaded sheets so that all sheets loaded sequentially with the same values of
email_to and email_subject will be written into a single workbook. The Group feature on the control
sheet can be used to control of the order of loading of sheets, so, for example all worksheets for a
given cost centre could be mailed in a single mail to the cost centre manager.

This functionality is triggered by the presence of parameters named email_to and output_file and
controlled by these and the other parameters listed below:

output_file
The name of the file where the loaded worksheet is to be saved. The type of file created depends on
the file extension given in this parameter:

If the file name has no extension or an extension of *.xls then an ordinary xls file will be created.
If the file name has an extension of *.htm then an HTML file will be created. (Note. Under some conditions
Excel will choose to create several secondary files as well as the primary file containing links to the
secondary files.)
If the file name has an extension of *.mht then a Web Archive (MHTML) file will be created. This is usually
better than an HTML file in that it always creates a single file but this functionality does require Excel 2002.

output_dir
The directory into which the file is to be written. If omitted, and output_file is not a fully qualified
pathname then the output file is written into the users temp directory.

output_title
The title property to be applied to the output file.

output_author
The author property to be applied to the output file.

output_subject
The subject property to be applied to the output file.

output_password
If password to be applied to the output file. If not present then no protection is applied.

Note:
This is not the same as the password parameter that is used in conjunction with the Protect output
sheets Option which applies password protection to individual sheets rather than to the whole
workbook (xls file).

email_to
The email recipient for the loaded worksheet. Or semicolon delimited list of email recipients.
email_cc
Email CC recipient for the loaded worksheet. Or semicolon delimited list of email cc recipients. (only
when using AGRESSO Mail)

email_reserve
A single email recipient to use in the event of failure to send to the main email recipient.

email_subject
The subject field for the email.

email_text
The text to be included in the body of the message. (only when using AGRESSO Mail)

xe_excel
Set this parameter to 1 to force the use of the Excel SendMail method when running on the
AGRESSO report server. Note: For backwards compatibility, using a parameter named email instead
of email_to will also have the same effect but it will generate a warning.
Immediate mode
In this mode AGRESSO Excelerator is invoked directly from within Excel via a special menu item
named AGRESSO Excelerator that appears on the Excel worksheets menu bar. This is a very useful
mode when developing and testing reports (especially in conjunction with the ability to read data
previously saved into a worksheet). If a connection to the database is required in this mode then this
has to be done via the ReportEngine web-service or an ODBC connection.
Command Line

AGRESSO report
ReportEngine reports can be run directly from AGRESSO as a report process on the report server. In
this case the database connection provided by AGRESSO will be used and no additional configuration
of data sources is required. To do this either set up a user defined menu item as described below or
simply select an output type of Excelerator, Report Creator in the report ordering window of an
existing report. If no xls or rpx file yet exists for the chosen standard report then one will be created.

To setup a user defined ReportEngine report in AGRESSO:

Set up an AGRESSO menu item to invoke this program as a server process. In User defined menus enter
a new row as follows:

CO Company to which menu item applies (or * for all)


ID Unique ID for this menu item
Bespoke Checked
Func Type Report
Function Report name (e.g. XL01 excelerator will look for a report file of this name)
Argument Not required leave blank
Menu Menu ID (for example 00 for Personal Menu)
Program Not required leave blank
Menu Text Text to appear in menu
Variant 0
# Sort value to determine position in menu (e.g. 99 to make it appear at the bottom)

Set up an AGRESSO user defined report to set the parameters as needed (see below). For the new
menu item, make an entry in User defined reports. Here the fields have there normal meaning except
that the fields width and E-mail are ignored. Any parameters defined will be passed through to
Excelerator and available as parameters as if defined by a set row in the _control sheet.

When Excelerator or Report Creator are invoked as an AGRESSO Report, Report Engine will look for
an input Excel workbook, or Report Creator rpx, in the report input folders (Customised Reports
etc).

The output file will be placed into "Report Results" and also added as a blob into the database so
that is available from "Maintenance of Ordered Reprots" within the ABW Smart Client and Self-
Service.

Progress and error messages will be written into the AGRESSO log file in the normal way.
Excel only: If an AGRESSO parameter named sheet is defined then its value will be interpreted as the
name of a sheet within the workbook to be loaded. sheet may also be a semi-colon delimited list of
sheets. If this parameter is not defined or left blank then all sheets will be loaded.

Other parameters defined in User defined report and set in the report ordering window will be available
for use within the AGRESSO Excelerator report.

The following standard parameters are always available


Client The current AGRESSO company

Lg or Language The users language

User_id User ID

Report_name The name of the report


AGRESSO client integration
Excelerator or Report Creator can be run directly from within the AGRESSO windows client. In this
case Excelerator will use the database connection provided by AGRESSO and no additional
configuration of data sources is required.
Appendix
Amount types and their column names on balance tables

Transaction Type Amount Type Column Name

General Ledger Amount amount

General Ledger Curr. Amount cur_amount

General Ledger Debit amount debit_amount

General Ledger Credit amount credit_amount

General Ledger Amount3 value_2

General Ledger Number number_1

General Ledger Value value_1

Budget Budget budget

Budget Budget currency budget_cur_amt

Budget Rev. budget budget2

Budget Forecast forecast

Budget Budget number bud_number

Budget Budget qty bud_value_1

Contract Ordered contr. cn_com_amount


Accounting

Contract Comm. Contract cn_rest_com_am


Accounting t

Grants Assignm grant_amount

Unauthorised Reg. Amount ua_amount


invoices

Unauthorised Reg. Curr. amnt ua_cur_amount


invoices

Purchase Goods received po_vow_amount


Transaction Type Amount Type Column Name

Purchase Purch. not po_rest_com_am


received t

Purchase Purch. ordered po_com_amount

Sales Orders Contr. margin so_margin

Sales Orders Goods dispatched so_vow_amount

Sales Orders Incompl. order so_rest_order

Sales Orders Invoiced so_inv_amount

Sales Orders Sales ordered so_com_amount

Sales Orders To invoice so_rest_invoice

Approved budget Approved budget bt_budget

Budget Budget bt_rev_budget


adjustments adjustments

Commitments Commitment cm_com_amount


amount

Commitments Commited amount cm_com_curr


currency

Pay schedule Commitment pc_com_amount


amount

Pay schedule Commited amount pc_com_curr


currency

WBS-budget Original budget cm_mce_amount

WBS-budget Rev. budget cm_cce_amount

WBS-budget Forecast cm_fct_amount

WBS-budget UEC cm_uec_amount

Approvals for Approved (AFE) cm_afe_amount


expenditure (AFE)

Cash Accounting Cash amount cash_amount


Transaction Type Amount Type Column Name

Financial Plan Amount plan_amt

Pre-order Requested cm_pre_order

Schedule (VOW) Schedule (VOW) cm_vow_amount


Column name suffixes on periodic balance tables / data warehouses

window prompt Column Name


Suffix

Current period _p

Last period _pp

Current period last _ppy


year

Year to date _ytd

Year to date last _pyytd


year

Forecast _pfc

OB current period _ppytd

Current alt. period _pr

Alt.period last year _pypr

Current year _y

Total to date _td

These are combined with the column names from the non-periodic balance table to give the column
name on the periodic balance table, for instance the column name General Ledger, Amount, Year to
date last year would be amount_pyytd.
Report Creator ARC

Basic Concepts
Controls
Controls are anything that is shown on, or inserted onto, the report surface. These in turn can be
attached to fields of data from the results set, or they can contain the results of formulae, etc. They
come in the form of, for example, Labels, Text Boxes and Lines.

Inserted on Report Surface

Define the Report Layout

Bound to Data Fields


Data Fields
These are the ways of actually getting information to the controls that we have already discussed.
They come in the form of, for example, Fields, Parameters and Formulas.

The Underlying Data

Not just the Fields from the driving SQL

You can add a textbox control to your report, which is bound to a data field from the result data.

Note

There are occasions when you would need to use an unbound field as well.
The page is displayed here to allow you to add, remove and alter the controls within the sections of
the report. Every section on the report has a grey horizontal bar at the top of it. At the top of this
bar, your cursor will change to a two-headed arrow, indicating that you can change the size of the
section above. To effectively 'remove' a section from your report, you can simply drag the bottom
line of the toolbar up, so that no part of the section remains visible. If you wish to temporarily 'hide'
a section whilst you are, for example, comparing two other sections, you can simply click on the
minus sign (-) in the top left-hand corner of the grey horizontal bar.
File Types

Report Definitions [.rpx]

Report Definitions are stored in files with the suffix .rpx.

These will generally be placed in the Customised Reports folder on the server.

Output files [.rdf]

The default report output format is written to files with the suffix .rdf.

This may be overridden by the xw_filetype/ xs_filetype parameters for any given report.

Canvas Files

Canvas files can be thought of as electronic pre-printed stationary allowing you to define the
background to your report including, but not limited to, boxes. Additionally, it is possible to specify
different canvas files on different page, or between the pages of a report output.

Canvases are files in their own right with the extension .cnv. They need to be stored next to the rpx
file.

If you are using a single canvas then the default name would be the same as the rpx file. So with a
standard Purchase Order the two files would be po01.rpx and po01.cnv.
Page setup

Page setup It is in here that you set the margins for the report. The
measurements in AGRESSO Report Creator are in twips,
which is a printers' term. A twip is a twentieth of an inch
point. There are 72 points to an inch.
Hence there are 20*72 = 1440 twips per inch.
As an inch is 2.54cm, there are approximately 567 twips per
cm.
A4 = 21021*567mm by 297mm -> 11905 twips by 16837
twips
Printer setup Here you choose or alter the paper size, width, height,
orientation of the page. You can also change the settings for
collation, duplex printing and paper bin
Grid settings In addition to the Alignment toolbar, you can also choose to
display the grid here and whether any new controls on the
report will be aligned to the grid. You can also change the
number of rows and columns in the grid here, as well as
opting for the grid to be set in inches or centimetres
Styles You can set new font styles here and alter existing ones
Page Setup Further Information

If you have a vertical red line on your Preview tab, this indicates that your page and print setup are
not correctly completed and information falling to the right of this line is not within the printable
area of the page. You need to resolve this otherwise you wil get extra blank pages when you print
the report.

For example, if you are working with A4 portrait paper and wish to have a one centimetre margin,
you would make sure the following are set:

The ActiveReport property, PrintWidth needs to be set to 11338

From the File menu, the Print Setup needs to have A4 and portrait chosen

From Page Setup in the File menu, ensure that the left margin is set to 567 and right margin is set to
0, and then click on the Printer settings button.

You then need to ensure that A4 is chosen as the size, portrait is chosen as the orientation, the
width is set to 11905 and the height to 16837.
If you are working with A4 landscape paper and wish to have a one centimetre margin, you would
make sure the following are set:

The ActiveReport property, PrintWidth needs to be set to 16269

From the File menu, the Print Setup needs to have A4 and landscape chosen

From Page Setup in the File menu, ensure that the left margin is set to 567 and right margin is set to
0, and then click on the Printer settings button. You then need to ensure that A4 is chosen as the
size, landscape is chosen as the orientation, the width is set to 16837 and the height to 11905

Print Width
The report itself has a print width that must be set. If you are wishing to set margins, then the
PrintWidth that you could use will be the maximum for that page size, minus the margins.

Once you have chosen a page size, the print width is set automatically.
Titles
With the standard reports you can often use Titles instead of Labels. These are the titles of the
datafields as they are set up within one of the tables in AGRESSO. This may be of little use on a
standard site, but if your company is multi-lingual, you would use titles to allow the report to be
easily translated into another language, simply by who has requested the report, or by the language
as set on a particular customer masterfile.

Sample

Cs04.rpx
Groups

Groups are used extensively in reports. Any subtotalling that you may wish to do, will be done on a
group. For example, if you wish to add a subtotal on your report, so that you can see what the total
debt is that a customer has, you would first need to insert a group.

A group consists of a header and a footer the header will come above the detail section and the
footer will come below it.

Note

Using a group within AGRESSO Report Creator does not have any effect upon the order of the data. You would need to
have already changed the order of the data from the ARW file. This is not covered on this course.
agr Object

The agr Object is available in the VB Script environment in Report Creator. It makes available a
number of Properties and Methods that neccessary when writing reports against the AGRESSO
database.

Primary Properties and Methods


UseDataSetOnly

agr.UseDataSetOnly

Specifies that the report will read the data from the supplied dataset No direct access to the
database will be allowed. This is designed to be used in conjunction with a "resql" file packaged in
the same "rerx" file as the report which will drive the extraction of the data from the database and
the creation of the DataSet.

Note that the following statements are not required and illegal in a report specifying
agr.UseDataSetOnly:-

agr.ParserType

agr.UseParameter

agr.UseTypedParameters

agr.UseTitle
ParserType

agr.ParserType = 1 ' 1=Native, 2=ASQL

Specifies the level of SQL parsing to be applied. This should be specified in all reports at the top of
the OnDataInitialize() method. If not, ARC will revert to the historic behaviour which is that "Native"
will be used when running from within the designer or from the Agresso client and "ASQL" will be
used when running on the Agresso Report Server. This is almost never what you want.
AttachFile

agr.AttachFile fileName

Specifies that the named file should be attached to the email when the report is distributed. This is
a better alternative to using the xa_ parameters. This could be used to attach a file for each invoice
line for example.

The arguments are as per agr.GetFile


DataSource

agr.DataSouce = "my_data_source"

or

agr.DataSource = ""

Specifies that the alternate (ODBC) datasource is to be used for all SQL (agr.SetQuery, agr.SelectInto
and agr.GetRecordSet) until cancelled by another agr.DataSource.

agr.DataSource = "" means revert to the primary agresso data source.

Note: This does not affect the agresso specific functions such as agr.GetDescription /
agr.GetDocument which always work against the primary agresso data source.
HasData

If agr.HasData Then
returns True if the agr.SetQuery method has returned one or more rows and False otherwise.

Example:

In the OnFormat Event of the Report Header you might use the following code:
If agr.HasData Then
rpt.lblReportTitle.Caption = "Resource List"
Else
Rpt.lblReportTitle.Caption = "Resource List No Data"
End If
Note: You must not use brackets on a function that takes no arguments.

agr.ParserType = 1 ' 1=Native, 2=ASQL, 3=DataSet

This should be specified in every report and is generated into all new reports.

Specifies the level of SQL parsing to be applied. If you do not specify this ARC will revert to the
historic behaviour which is that "Native" will be used when running from within the designer or from
the Agresso client and "ASQL" will be used when running on the Agresso Report Server. This is
almost never what you want.

agr.AttachDocument client, DocType, Key1, [Key2,] [Key6]

Specifies that the Named document should be attached to the email when the report is distributed.
This is a better alternative to using the xa_ parameters. This could be used to attach a document for
each invoice line for example.

The arguments are as per agr.GetDocument


agr.AttachFile fileName

Specifies that the named file should be attached to the email when the report is distributed. This is
a better alternative to using the xa_ parameters. This could be used to attach a file for each invoice
line for example.

The arguments are as per agr.GetFile


agr.DataSouce = "my_data_source"

or

agr.DataSource = ""

Specifies that the alternate (ODBC) datasource is to be used for all SQL (agr.SetQuery, agr.SelectInto
and agr.GetRecordSet) until cancelled by another agr.DataSource.

agr.DataSource = "" means revert to the primary agresso data source.

Note: This does not affect the agresso specific functions such as agr.GetDescription /
agr.GetDocument which always work against the primary agresso data source.
UseParameter / Parameter / UseTypedParameters

agr.UseTypedParameters

tells the system to use typed parameters. This call should be used in all new reports and is included in the code that is
generated automatically. If it is omitted then all parameters will be treated as strings as they were in versions of
ReportEngine prior to 7.3/1071. NB agr.UseDataSetOnly also forces this option.

agr.UseParameter ParameterName, DefaultValue [, Type]

tells the system to use the specified parameter. Only parameters used in this way will be imported
from AGRESSO. It is useful to specify a default value so that the report can also be run
independently of AGRESSO during the development process. If specified the Type must be one of
"integer", "string", "date", "float". If the given default value or the value passed in to the report is
not of this type and cannot be converted to this type then an error occurs. If Type is not specified
then the type is inferred from the type of the DefaultValue argument.

myvariable = agr.Parameter("parameter_name")

Gets the value of a parameter previously defined with agr.UseParameter.

When entering SQL in the Edit | Query screen you use the prefix $? to get the parameter value:

AND field = '$?parameter_name'

Note Parameters can also be bound directly to Field Controls.

Sub OnDataInitialize

' parameters

agr.UseTypedParameters

agr.UseParameter "apar_type", "R"

agr.UseParameter "my_date", "2005-02-22", "date"

agr.UseParameter "one_point_three", 1.3


Merge

agr.Merge("formula_name")

Where formula_name is a formula bound to a Rich Edit Control.

Causes all fields, formulas, titles, parameters etc within the text of the Rich Edit control to be
replaced by their current values.

E.g. if the Rich Edit control contains the text:

This is some example text containing [data_field1] and some formatting.

Then the string [data_field1] will be replaced by the current value of the field named "data_field1"
and all the formatting of the text will be preserved.

Please see sample "Merge.rpx"

Example:

Sub OnDataInitialize
agr.Formula("Text1") = ""
agr.Formula("Text2") = ""

End Sub

Sub OnFetchData(eof)
If eof Then Exit Sub

If agr.IsGroupStart("resource_id") Then
agr.Merge "Text1"
End If

if agr.isgroupend("resource_id") then
agr.Merge "Text2"
end if
End Sub
Formula

myVariable = agr.Formula(formula_name)
Gets the value of a formula field named formula_name

agr.Formula(formula_name) = expression
Sets the value of the formula field named formula_name to the value of expression

When entering SQL in the Edit | Query screen you use the prefix $@ to get the formula value:

AND field = '$@formula_name'

Note Valid only in OnDataInitialize or OnFetchData.

When used to set a formula in OnDataInitialize then a new formula field will be created if it does not
already exist.

Example:

This example uses a variable called WholeAddr:


agr.Formula("Address_40") = WholeAddr

This example uses an expression:


agr.Formula("CustAddr") = agr.field("faddr_apar")+ agr.field("faddr2_apar")
Field

myvariable = agr.Field("myfield")

Gets the value of the field named "myfield" from the report's query.

Note Only valid in Report_FetchData()

Example:

This example uses the variable addr1:


Addr1 = Mid (agr.Field("Address"), 1, 40)
IsGroupStart / IsGroupEnd

If agr.IsGroupStart(field) Then
code goes here
End If

If agr.IsGroupEnd(field) Then
code goes here
End If

Note Only Valid in OnFetchData().

Returns true if the current row is the Start or End of the break point/ group. Field should be the
name of the field specified in the DataField property of a GroupHeader section in the report. If Field
is a zero length string then these properties can be used to identify the first or last row in the
recordset.

Example:

This example sets the value of variable Tot_NotDue to zero:


If agr.IsGroupStart("currency") Then
agr.Formula("Tot_NotDue") = 0
End If
UseParentControl / ParentControl

agr.UseParentControl parent_control_name, default_value


declares that the sub-report references the specified Textbox Controlin the parent report. It is
useful to specify a default value so that the report can also be run independently of AGRESSO and
independently of the parent report during the development process.

sSql = sSql & "" & agr.ParentControl(parent_control_name)


Gets the DataValue property of the Textbox Control in the parent report.

Note Valid only in a sub-report.

agr.ParentControl(parent_control_name) = myDataValue
Sets the DataValue property of the Textbox Control in the parent report.

Note Valid only in a sub-report.

When entering SQL in the Edit | Query screen you use the prefix $! to get the parent control value:
AND field = '$!parent_control_name'

In order to use a Textbox Control from the parent report in a sub-report it must first be declared
using agr.UseParentControl.

Examples
agr.UseParentControl "txtvoucherno", 39980001

As used in Edit | Query


AND T.voucher_no = '$!txtvoucherno'

As seen in vbScript
where t.voucher_no = agr.ParentControl("txtvoucherno")
ParentTag

sTag = agr.ParentTag

Returns the value of the "Tag" property of the sub-report control containing this instance of the sub-
report. If the report is not a sub-report then a zero length string will be returned.

This property can be very useful if you wish to have two instances of the same sub-report within the
same section of the main report. E.g. you might wish to run two instances of the report one of
which will me marked as a copy with code like this:

if agr.ParentTag = "copy" then


rpt.lblCopy.Caption = "COPY"
else
rpt.lblCopy.Caption = ""
end if
SetDefaultCanvas / SetCanvas

agr.SetDefaultCanvas canvas_name

Defines the Canvas that will be used to underlay each report page unless overridden using
agr.SetCanvas.

Note Valid only in OnDataInitialize()

agr.SetCanvas page_number, canvas_name, [canvas_type]

Defines the Canvas that will be used on the specified page.

By default the Canvas is used to underlay the page (canvas_type = 0).

Set canvas_type to 1 if you wish to insert the Canvas before the specified page.

Set canvas_type to 2 if you wish to insert the Canvas after the specified page.

Example
Sub OnBeforePrint
select case rpt.txtClient
case "EN"
agr.SetCanvas rpt.txtPageNumber, "SetCanvas1"
case "NO"
agr.SetCanvas rpt.txtPageNumber, "SetCanvas2"
end select
End Sub

Sample

SetCanvas.rpx
SetPaperBin / SetDefaultPaperBin

agr.SetDefaultPaperBin bin

Sets the paper bin that will be used for each report page unless overridden using agr.SetPaperBin.
Only valid in OnDataInitialize().

agr.SetPaperBin page_number, bin

Sets the Paper Bin that will be used on the specified page.

Example
Sub OnBeforePrint
select case rpt.txtClient
case "EN"
agr.SetCanvas rpt.txtPageNumber, 1
case "NO"
agr.SetCanvas rpt.txtPageNumber, 2
end select
End Sub
NOTE: Paper bins are printer specific. Some printers require bin numbers like 1 or 2 corresponding
to the number embossed on the physical device. Others require numbers like 257 and 258.

Sample

SetPaperBin.rpx
SetQuery

agr.SetQuery sql

sets the sql select statement to be used as the main driving query for the report.

agr.SetQuery AGRESSO means take the data given by the output of an arw report or Browser screen.

agr.SetQuery AGRESSO template_name means run the specified browser template and take the
data from that

agr.SetQuery TABLE my_table_name means take the data from the specified table name within an
externally supplied data set.

NOTE: It is always possible and better (more efficient) to write the sql within the report than to use
the data output from an arw report.

Valid only in OnDataInitialize.

Examples:

This example uses an ARW:

'#Query - this code is automatically inserted by 'Edit>SQL'. If you


change it here you will no longer be able to use the SQL editor
agr.SetQuery "AGRESSO"
'#End Query 10627

This example uses code that has been entered via the Edit | Query screen:

'#Query - this code is automatically inserted by 'Edit>SQL'. If you


change it here you will no longer be able to use the SQL editor
Dim sQuery
sQuery = "SELECT client, client_name"
sQuery = sQuery & vbCrLf & "FROM acrclient"
sQuery = sQuery & vbCrLf & "ORDER BY client"
agr.SetQuery sQuery
'#End Query 81111
SelectInto

agr.SelectInto sql [, prefix]


or
nRows = agr.SelectInto(sql [, prefix])

Note sql means a SQL statement

Runs sql and sets the results into a formula for each of the returned columns. The Select
statement should return zero or one row. If no row is returned then the variables are set to
appropriate defaults for their data type.

If specified nRows is set to the number of rows returned by the SQL statement (0 or 1)

If "prefix" is specified the this will be added to the front of the returned column names to give the
formula names.

Valid only in OnDataInitialize and OnFetchData events.

Note Using this method can very often simplify the main Select statement of the report and remove
the need to handle outer joins.

Note If used in the OnFetchData event it will be necessary first to create the formulas within the
OnDataInitialize() event using agr.Formula("column_name") = initial_value

Example
agr.SelectInto("SELECT rel_value as Del_Type" & _
" FROM aglrelvalue " & _
" WHERE att_value = '" & agr.Field("apar_id") & "'" & _
" AND attribute_id = 'A4' " & _
" AND client = '" & agr.Parameter("client") & "'" & _
" AND rel_attr_id = 'D3' ")
GetRecordSet

set rs = agr.GetRecordSet(sql)

Runs sql and returns a corresponding ADO recordset.

Sample

GetRecordSet.rpx
GetFile

MyFile = agr.GetFile(fileName)

Reads the entire contents of the specified file from the file system. This is often useful for including
a company logo in a report. It may reduce the size of the rpx file considerably.

Note. If filename is not relative then it is taken to be relative to the location of the rpx file that is
currently executed. Often the "Customized Reports" folder.

Example

' get the company logo


agr.Formula("logo") = agr.GetFile("my_logo_file.jpg")

(the formula "logo" would then be used as the data source for a picture control)
AGRESSO Specific Methods

GetSysConf

myValue = agr.GetSysConf([name], [client])


Returns an AGRESSO system configuration code

Example

In the OnDataInitialize Event of the Report you might wish to find the system parameter for the
relation attribute id to display on the report:
agr.Formula("rel_attr_id1") = agr.GetSysConf("UKP_REL_ATTR_ID1")
GetText

mytext = agr.GetText(TextType, Variant, Language)

Returns the requested AGRESSO text (used for Statement text; Reminder text, etc.)
GetAddress

myaddress = agr.GetAddress(AttributeId, DimValue, [Client], [AddressType],


[SequenceNo])

Returns the address for the given attribute value in the format defined in AGRESSO screen AG40
(Address setup).

Example
agr.Formula("Address") = agr.GetAddress("A5", agr.field("apar_id"))
GetDescription

mydescription = agr.GetDescription(AttributeId, AttributeValue, [client], [language])

Returns the description of the AttributeValue assuming that it is a valid value of attribute
specified by AttributeId. Client and language are taken from the corresponding parameters if
not supplied.

Example
If agr.IsGroupStart("invoice_ref") Then
agr.Formula("Deliv_Descr") = agr.GetDescription("D3",
agr.formula("Del_Type"))
End If
GetDocument

MyDocument = agr.GetDocument(client, DocType, Key1, [Key2,] [Key6])

Gets the specified document from the Agresso document archive.

Example

' get the photo


' arguments are:
' client
' DocType
' Key1
' Key2
' ...
' Key6
agr.Formula("photo") = agr.GetDocument(agr.Parameter("client"),
msDocType,agr.Parameter("client"), agr.Field("resource_id"))
UseTitle / Title

agr.UseTitle title_name, default_value

Tells the system to use the specified title. Only titles used in this way will be imported from
AGRESSO. It is useful to specify a default value so that the report can also be run independently of
AGRESSO during the development process.

mytitle = agr.Title(title_name)

Returns the AGRESSO title in the current language.

Valid only in OnDataInitialize and OnFetchData

Note Titles can also be bound directly to Field Controls.

Example:
agr.UseTitle "interest", "Int. rate"

UseTitles

agr.UseTitles table_name

When working agaist a DataSet (agr.ParserType = 3) allows titles to be loaded from the specified
table in the dataset. The table should contain exactly one row
AttachDocument

agr.AttachDocument client, DocType, Key1, [Key2,] [Key6]

Specifies that the Named document should be attached to the email when the report is distributed.
This is a better alternative to using the xa_ parameters. This could be used to attach a document for
each invoice line for example.

The arguments are as per agr.GetDocument


Utility Methods

ToDate

mydate = agr.ToDate(date_string)
converts date_string to a date value. Has the same effect as CDate() except that formats like
yyyymmdd, yyyymmdd hh:mm or yyyymmdd hh:mm:ss (as for date type parameters passed from
AGRESSO) are also acceptable and that if date_string is a zero length string then 1900-01-01
00:00:00 is returned.

Example:

In the OnDataInitalize Event of the Report you might use the following code:
agr.Formula("date_from") = agr.ToDate(agr.Parameter("date_from"))
agr.Formula("date_to") = agr.ToDate(agr.Parameter("date_to"))
In the OnFetchData Event of the Report you might then use the following code:
If agr.Field("date_from") <= agr.Formula("date_to") And _
agr.Field("date_to") >= agr.Formula("date_from") Then
agr.Formula("back_colour") = vbRed
Else
agr.Formula("back_colour") = vbYellow
End If
You can then use the "back_colour" formula to highlight those rows that overlap the given dates.
FormatSQLDate

Please note that agr.FormatSQLDate() is superseded by agr.QuoteSQL()

mysql = mysql & " AND " & agr.FormatSQLDate(mydate) & "BETWEEN"
Given a date argument this returns a string suitable for inclusion in an SQL statement.

Example:

In the OnFetchData Event of the Report you might wish to find resource relations for the payment
date:
sSql = "SELECT r.rel_value" & _
" FROM ahsrelvalue r" & _
" WHERE r.client = '" & agr.Parameter("client") & "'" & _
" AND " & agr.FormatSQLDate(agr.Formula("pay_date")) & _
" BETWEEN r.date_from AND r.date_to" & _
" AND r.rel_attr_id = '" & msRelAttrId & "'" & _
" AND r.resource_id = '" & agr.Field("resource_id") & "'"
agr.SelectInto(sSql)
QuoteSQL

mysql = mysql & " AND " & agr.QuoteSQL(mydate) & "BETWEEN"

or very often:

mysql = mysql & " AND " & agr.QuoteSQL(agr.Parameter("my_date_parameter")) &


"BETWEEN"

Quotes a variable in a format suitable for inclusion in an SQL statement.

E.g. if value is a string equal to abc it will return 'abc'. If value is a date it will return $date('yyyy-
mm-dd hh:nn:ss'), if value is an number equal to 12.34 it will return 12.34 (even if the decimal
separator is a comma in the current locale)

agr.QuoteSQL("my string") will return 'my string'

agr.QuoteSQL(myDateVariable) will return $date('yyyy-mm-dd hh:nn:ss')

agr.QuoteSQL(12.34) will return 12.34 (with a "." whatever the current regional settings)

Example:

In the OnFetchData Event of the Report you might wish to find resource relations for the payment
date:
sSql = "SELECT r.rel_value" & _
" FROM ahsrelvalue r" & _
" WHERE r.client =agr.QuoteSQL(agr.Parameter("client")) & _
" AND " & agr.QuoteSQL(agr.Formula("pay_date")) & _
" BETWEEN r.date_from AND r.date_to" & _
" AND r.rel_attr_id='" & msRelAttrId & "'" & _
" AND r.resource_id=" & agr.QuoteSQL(agr.Field("resource_id"))
agr.SelectInto(sSql)
Format

myvariable = agr.Format(expression, format)

Converts expression to a string usually for use in a formula.

In fact this simplifies the VB Format function as it offers better functionality than the VBScript
FormatDate(), FormatNumber() etc.
Log

agr.Log message

Writes message into the log file.

Useful for debugging.

Example
agr.Log (sTmpMonth)
Events

The following events are available from VB Script:

Report Events

OnDataInitialize()

This event is fired once when the report starts to run and is the only point at which new data fields
can be created.

All calls to agr.UseParameter, agr.UseTitle, agr.UseParentControl and the initialization of all


Formulas must appear here (or in a subroutine called from here).

It must also contain an agr.SetQuery statement to define where the data is to come from and create
the Fields.

OnFetchData(eof)

This event is called sequentially for each row of data with eof (end of file) set to false and then one
more time with eof set to true. At the point where the extra call with eof set to true is made the
Fields are still set to their values for the last row.

It is here that all data processing should occur and all formulas be evaluated because this is the only
event that is guaranteed to be fired in sequence once for each row. The agr.IsGroupStart() and
agr.IsGroupEnd() are essential to identify rows that will be bound to the corresponding Group
Header and Group Footer sections.

In this section you must not refer directly to any controls in any section of the report.

The only way of passing data from here to the controls is to set up a formula and bind a control to it.

OnReportStart()

This event fires after OnDataInitialize but before the first OnFetchData.

It is useful for adjusting the report, perhaps to change the DataField property of Controls.
Section Events

The report consists of the following sections:

Report Header

Page Header

Group Headers

Detail

Group Footers

Page Footer

Report Footer

You cannot guarantee the order in which these are processed.

There are three events that occur for every section:

OnFormat

OnBeforePrint

OnAfterPrint.

Within each event, you must only refer to controls that occur on the report surface in the current
section.

You can add a non-visible control bound to a formula onto Group Header section, if you wished to
refer to this within the format event. For example, if you wished to change which header wording
you used, dependent upon a field in the dataset, you would need to add a non-visible control to the
Group Header, which was bound to the client data field. Then you could refer to this within the
OnFormat event for the Group Header section.

In these events you can refer to controls within this section only. It is invalid to refer to controls
outside this section or data fields, i.e. agr.Field(), agr.Formula(), agr.Title() and agr.IsGroupStart()
cannot be used. If you want to use the value of a data field then you should include a hidden control
bound to the data field.

OnFormat()
This is fired before the data is laid on the page and can be used to modify the layout of the section or
any control within the section. The format of the section and the controls it contains can be changed
including changing its height or making it invisible.

Example

If you wished to change which company logo you used, dependent upon the client you have run the
report from, you would need to add a non-visible control to the Group Header, which was bound to
the client data field. Then you could refer to this within the OnFormat event for the Group Header
section.

Note

You cannot use this event to process data, evaluate accumulators etc. This must be done in
Report_OnFetchData()

OnBeforePrint()

This event fires when the section is ready to be printed.

At this point you can access the values of summary fields (including page numbers and total page
counts)

Within this event you can modify the control values, but you cannot alter properties such as Height.

Example

If you use the menu item Page N/M from the Insert menu, the coding needed will be added to this
event for the section automatically.

OnAfterPrint()

This is the final event that fires after the section has been printed.

At this point it is too late to change anything. However, this event is where you should add entries
to the Table of Contents (TOC).
Portable SQL Functions

These functions are now deprecated and should not be used in new reports. Please use ASQL syntax
instead which is now always available.

A number of special portable SQL functions are available which will produce the correct results on
any supported DBMS or connection mechanism. They all have the form

$function([expression], [expression], )

The functions take zero or more expressions as arguments but the brackets are mandatory even for
functions with no arguments. The following functions are currently supported:

$TO_CHAR

$to_char(expression)

Converts expression to a character value, e.g.

SELECT * FROM acuheader WHERE $to_char(apar_id) = '123'


$DATE

$date(date_literal)

Converts date_literal to a date value. date_literal must be in one of the following


formats:

'yyyymmdd hh:nn:ss'

'yyyymmdd hh:nn'

'yyyymmdd'

'yyyy-mm-dd hh:nn:ss'

'yyyy-mm-dd'

SELECT * FROM acutrans WHERE due_date < $date('20040131 00:00:00')

NB the format used for date parameters in AGRESSO server processes is yyyymmdd hh:nn:ss
$IFNULL

$ifnull(expression, value)

Returns value if expression is null otherwise returns expression.

(Equivalent to IsNull() in SQL Server or NVL() in Oracle)


$NOW

$now()

Evaluates to the current date/time, e.g.

SELECT $now(), * FROM acrclient

NB the brackets are needed.


$MID

$mid(expression, n, m)

Returns a substring of expression starting at character n and m characters long, e.g.

$mid('abcdef',3,2)

will return 'cd'


$LEFT

$left(expression, n)

Returns a substring of expression starting at character 1 and n characters long, e.g.

$left('abcdef', 2)

will return 'ab'


$RIGHT

$right(expression, n)

Returns a substring consisting of the rightmost n characters of expression, e.g.

$right('abcdef', 2)

will return 'ef'


$CONCAT

$concat(expression1, expression2 [,expression3 [,expression4,]])

Returns the concatenation of expression1 and expression2, e.g.

$concat('abcdef','gh')

will return 'abcdefgh'

up to 8 expressions may be concatenated.


$LPAD

$lpad(expression, n, ['c'])

Returns a string consisting of expression, n characters long padded on the left with character
'c', If not specified the string is padded with spaces e.g.

$lpad('123',5,'0')

will return '00123'. This is useful for performing a numeric sort on numbers stored as strings.
$MOD

$mod(expression1, expression2)

Returns the value of expression1 modulo expression2, e.g.

$mod(3,2)

will return 1
Zero Length String

''

Not exactly a function but '' (a literal zero length string) will be converted to ' ' (a literal single space)
when running on an ORACLE database. This is because AGRESSO uses a single space to represent a
zero length string when running on ORACLE. So that

SELECT count(*) FROM agldescription WHERE dim_value = ''

will have the same effect on ORACLE as it does on MS SQL Server.


Report Designer
When you open the AGRESSO Report Creator Designer, you will see three tabs:

Design Tab
This page is part of the standard layout for the Agresso Report Writer.

Canvas Tab

The canvas, in its simplest form, contains all of the information you would have traditionally placed
on to pre-printed stationery.

You can draw lines and boxes on the report itself, if they are restricted to the header and footer
sections, or on the canvas, if they are to continue to the bottom of pages.

Ensure that your canvas has the same page and print width settings as your main report.

Use the double-headed arrows at the edge of the page to make the white area of the canvas big
enough to hold the box that you are going to draw.

Select Canvas | Save and save this with the same name as the report itself you will notice that the
canvas will have a .cnv extension.

As long as the files are both stored in the same folder (e.g. the Customised Reports folder), they will
continue to work together.

Preview Tab
This provides a preview of the report output.
Menus

File Menu

New Open a new report


Open Open an existing report
Save Save the open report
Save As Save the open report under a different name

Export This allows you to save the report as a range of differing


files, e.g. as a pdf file.
Note this option is only available in the Preview tab
Print setup Accesses the standard Windows print setup screen, where
page size and orientation can be set
Page setup There are buttons here enabling you to alter the page
setup, the printer setup, the grid settings and the style
properties
Exit Closes the AGRESSO Report Creator
View Menu

Grid Show or hide the grid on the reporting page


Explorer Show or hide the Explorer Toolbar
Log file View the log file from the most recent previewing of the
report
Canvas Menu

These options all concern the Canvas tab:

New Open a new canvas


Open Open an existing canvas
Save Save the open canvas
Save as Save the open canvas under a different name
Close Close the open canvas
Edit Menu

Find This will find all the instances of a string in the report,
i.e. not just in the script but also in the report. This is
useful to find, for example, where a field is used as it
will point you to the Controls it is linked with as well
as the script sections that contain it
Query Edit the query that creates the dataset for the report.
Script Edit the script that runs behind the report.
Datafield Alter the datafield that a control is bound to
Caption On a label control, edit the caption that you originally
entered
Report Name Allows you to change the subreport that is linked to
your report. Click on the subreport before choosing
the option.
Insert Menu

Page number Inserts the page number for the page this can be part of
the numbering for the whole report or for a group within
the report
Total page count Inserts the total page number this can be part of the
numbering for the whole report or for a group within the
report
Page N / M A special function that adds in the page number and the
total page count, preceded by the word page. This adds
hidden controls to the report and code into the relevant
section of the script
Date Inserts the current date and time this can be formatted
to show just the date or just the time
Tools Menu

Review control If you have altered the data fields that a textbox is bound to, you can
names simply choose this option to re-set the names of the controls.
On occasions this may also be useful at other times too, for example
when the report appears to have lost the connection with the data.
Map data fields This looks through the report allowing user to map any references to
non-existent data fields
Help Menu

Help Access the AGRESSO Report Engine helpfiles


About AGRESSO Find the build and version number of the software
Report Creator
Toolbars and Toolboxes

You can close and delete the toolbars and boxes sometimes without meaning to.

Click on the grey area at the top of the screen with your right mouse button and you can choose to
display them again.
Design Toolbox
Pointer changes the cursor back to a pointer
Label adds a label control to the report
Textbox adds a textbox control to the report that can be linked to fields,
parameters, formulas, group start/end or titles
Checkbox adds a checkbox control to the report
Image adds a control to the report that can be linked to an image via
the Picture property
Line adds a line to the report
Shape adds a shape to the report the choice is from a rectangle,
ellipse or rounded rectangle. The choice is controlled via the Shape
property, with rectangle being the default
RichEdit Control adds a rich edit control to the report
Frame adds a frame to the report
Subreport Control helps to add a subreport to the report
PageBreak a method of adding a page break to the report. Perhaps a
more useful method is via the NewPage property on a group header or
footer
OLE Object is for advanced use only and is not supported by Agresso
ActiveX Control only to be used for charts using MSChart. Other items
here use code which is external to the AGRESSO Report Creator and as
such are not supported by Agresso
Barcode Control allows insertion of a bar code that can be linked to
fields, parameters, formulas, group start/end or titles
ADO Data Control you cannot use Data Controls with Agresso Report
Creator
DAO Data Control you cannot use Data Controls with Agresso Report
Creator
RDO Data Control you cannot use Data Controls with Agresso Report
Creator
XML Data Control you cannot use Data Controls with Agresso Report
Creator
Property Toolbox

In addition to the formatting toolbars, there is also an object property toolbox on the right. The
contents of this toolbox will change, depending on what you have highlighted.

You can also use the drop-down box at the top to choose a different object.
The Format Toolbar

Select a style for the paragraph

Select and applies a font to selected text

Select a point size for a font

Makes selected text bold

Makes selected text italic

Adds an underline to selected text

Aligns selected text to the left of the paragraph

Aligns selected text in the centre of the paragraph

Aligns selected text to the right of the paragraph

Applies bullets to a paragraph

Decreases an indent

Increases an indent

Displays the fill colour palette to fill an object

Displays the fill colour palette to change font colour

Displays the fill colour palette to change the line colour

Displays the line palette to select a line type


The Alignment Toolbar

Bring highlighted control(s) to front


Send highlighted control(s) to back
Lock controls
Switch on/off snap to grid when this is switched on,
any new controls will automatically line-up to the grid
Align controls
Make controls the same width
Make controls the same height
Make controls the same size
Position of the control
Size of the control
Report Explorer

Every report is broken up into sections. This pane on the left-hand side of the screen shows the
current sections of the report.

If you click on the plus signs, you can also see all of the controls that are on the report, in their
relevant sections.

You can also click on an item in this pane and it will be automatically shown on the report.

The Report Header section may contain introductory information

The Page Header section will often contain the titles of columns

Any Group Headers will go next, in order

The Detail area will contain textbox controls bound to data fields

The Page Footer may contain the page numbering options or running totals

Any Group Footers will follow, in reverse order

The Report Footer is a useful place for summing up the statistics such as Grand Totals etc.
Technical Notes

AGRESSO Report Creator is built around ActiveReports 2.0 from Data Dynamics. A substantial Help
File for Active Reports 2.0 can be downloaded from the Data Dyanamics web site
www.datadynamics.com. This may be useful especially as a reference for the meaning of the
properties of the reports, sections and controls. However, please note that there are different ways
of using ActiveReports and not all the information in the help file is applicable to AGRESSO Report
Creator.

AGRESSO Report Creator uses VBScript. For a complete language reference for VBScript please refer
to http://msdn.microsoft.com/scripting. However, please note that not all the VBScript functionality
is applicable to AGRESSO Report Creator.

Note

There are various sample reports that have been designed to help demonstrate concepts. Where
appropriate, these are indicated at the bottom of topics.
Multiple Canvases

It is possible to have different canvases for different pages in the report.

To define a canvas for the whole report use SetDefaultCanvas

This only needs to be set if your default canvas has a different name from the report.

The default can be overridden on a page-by-page basis using the SetCanvas method.

Sample

SetCanvas.rpx
The agr and rpt Objects

Script
The reports are all written in VB Script. Through the VB Script we have access to objects. Objects
are a little like links to libraries of code that can be used. So using an object will provide access to
various collections, properties and methods.

There are two main objects that you would be using within AGRESSO Report Creator:
The agr Object
From the agr object, there are three main collections of values:

Field links to a field that is contained within the dataset


Formula is created and initialised within the script
Parameter passes information from the report ordering screen (in a server environment) and is initialised in the
script
Example
agr.Formula("inc VAT") = agr.field ("amount") *1.175
The formulas and parameters all need to be initialised at the top of the script, before they can be
used. When you create a formula in AGRESSO Report Creator, the software sets this up for you.
The rpt Object

This object allows you to reference the sections and controls on the report.

Example

The name of a textbox control here can be used as shown below:

If rpt.txtarticleid=0 then
rpt.txtClient.visible = false
Else
rpt.txtClient.visible = true
End if
Multiple SELECT Statements

Writing the SQL


SetQuery creates the main dataset for the report. You can use the keyword AGRESSO to access a
dataset that has been created by an ARW, or write the SQL yourself.

You can access the query through Edit | Query or via the Script window (Note you would generally
endeavour to alter this through the query window and allow AGRESSO Report Creator to update the
code in the Script window).

This is the main Select statement.

With SelectInto you write the SQL to return a single row of data, rather than a dataset. The data is
returned into the formulas so that you can access it.

Sample

GL09.rpx

Advanced Feature
With GetRecordSet you write the SQL and you need to handle the data that it returns. It returns an
ADO recordset that you then process in the VBScript.

Sample

GetRecordSet.rpx
Multi-lingual Texts

The multilingual texts are looked up from AGRESSO for the language defined by the parameter
"language". This can be overridden with the parameters "xw_language" and "xs_language". The
titles available for a standard report are held in asysrepref. On top of this you can define numeric
titles and these will be looked up in the appropriate asystitles table.

Example

Report GL11 has the following title in asysrepref: t_client. If you define it in the RPX file using
agr.UseTitle "client", "Client" then it will substitute in the value for the correct
language when you run the report.

If you have a user-defined report in which you want to use the language independent version of
client you use agr.UseTitle "50257", "Client".

Where 50257 is the number of the title from asystitles that you wish to use in your report.

AGRESSO Report Creator will substitute the correct value from the correct version of asystitles when
you run the report.
Golden Rules

Do
1. USE Bound Fields. I.e. set the DataField property of all Field Controls to the name of a field (from the recordset), a
formula (defined in OnFetchData), a parameter or a title.
2. DO ALL data processing, calculations, subtotalling etc in OnDataInitialize / OnFetchData make use of
agr.IsGroupStart() and agr.IsGroupEnd(). NEVER use Section_OnFormat() events for this purpose
3. USE Tools | Verify it is there to enforce the rules and prevent you from producing incorrect reports. (It is quite
possible to write reports incorrectly which look right some of the time).
4. USE the Insert Text box button or Edit | Sql to generate VBScript for you. It is much easier than starting with an
empty screen.

Do not
1. DO NOT use Page Headers to display information which changes during the report. USE a
Group Header with the "Repeat" property set to 4 Every Page including no detail.
2. NEVER refer to the fields collection outside of OnDataInitialize or OnFetchData. This is
because AGRESSO Report Creator "fetches ahead" so that outside of these events you can
never assume that the fields collection with contain the values from the correct row.
3. NEVER rely on the order that the OnFormat events are fired in. Sections are formatted in
advance in order to determine if they will fit on the same page etc.
4. NEVER refer to a Field Control outside its own section.
5. DO NOT refer directly to the rpt.fields collection Use agr.field, agr.title, agr.parameter,
agr.formula they provide much better error handling and enforce some of the other rules
6. DO NOT attempt to implement global variables using agr.formula() in order to
communicate between the Section_OnFormat() events because you cannot rely on the
order in which these events fire.
7. There are no intrinsic global variables.
8. The Section_OnFormat() events should only be used for adjusting the format of the current section never for data
processing. If you need to refer to values other than those of the visible fields in the section then include hidden
controls bound to the data that you want to use
9. Putting VBScript into a DataField property (preceeded by an "=") is almost always the wrong thing to do because
you can only refer to other field controls in the same section not items in the fields collection.
10. DO NOT use page numbering where the page break is in a deeper group than the group you are putting the page
number into, as the results may be unpredicatble.
Special Parameters

The following AGRESSO parameters have special meaning to ReportEngine.

Report Splitting (xs_, xw_)


ParamID Param name Example value Comments

xs_breakcol Break Column apar_id Name of column to break on


apar_id,voucher_no or comma separated list of columns

xs_filetype File Type of split files pdf Any of the supported output file types for
the given report type.

xs_print Print Split Report File 1 Determines if split should be printed as


they are created.

xs_required Split Report File 0 Determines if split files that have been
Required successfully emailed or entered into the
database should also be kept on disk
(default = NOT xw_required)

xs_inrep Input report name CS04xx Specifies the name of the input file (xls or
rpt) to be used for this particular
breakpoint. If undefined uses the value
of xs_definrep or if that is not defined
then the normal input file will be used for
all breakpoints.

xs_definrep Default input report CS04def See above.


name

xs_language Language for split <:column_name> Defined the language to be used for the
report texts multilingual texts in the split reports
(t_xxx). Note this can evaluate to a
different language for each split report.

xs_nolog Logging flag 0 Set to 1 to inhibit logging from split


reports.

xs_distrep Distribution input If defined this report will be run against


report name the distribution log dataset.

xw_required Whole Report 0 Determines if whole/unsplit report is also


Required to be produced (default=1)

xw_filetype File Type of main pdf Any of the supported output file types for
output file the given report type.

xw_language Language for whole FR Defined the language to be used for the
report texts multilingual texts in the whole report
(t_xxx)

xw_load Load sheet 1 Excelerator only. Determines if the whole


report is to be loaded. The default value
is 1 if xw_post is 0 and 0 otherwise.

xw_post Post sheet 0 Excelerator only. Determines if the whole


report is to be posted back. The default
value is 0. Set it to 1 if the whole report is
to be validated or to 2 if it is to be posted.
Document Archiving (xd_)
ParamID Param name Example value Comments

xd_doctype Document Type IMAGE The Document Type to be used in the


Document Archive

xd_indexvals Index Values <client>,<apar_id> A comma delimited list of index values


that must correspond to the required
index as defined on the Document Type.

xd_title Document Title Statement <period> A title for the Document

xd_desc Document Statement for <period> A description for the Document


Description

xd_comments Document As at <report_date> A comment for the Document


Comments

xd_archive Document Archive XX Archive name. This defaults to the


Name current client which is the correct value in
almost all installations. So this parameter
is only needed if the document is to be
placed in some other archive, perhaps a
different client.
E-mailing (xe_, xa_)
ParamID Param name Example value Comments

xe_to Email To <email_address> Defines the email address to which the


output is to be sent, parameters will be
substituted at each breakpoint. NB
requires that the email address exist in
the. xe_attid/value is probably more
useful.

xe_cc Email Cc <cc_name> Defines the email address to which the


output is to be carbon copied.
Parameters will be substituted at each
breakpoint. NB requires that the email
address exist in the data

xe_from Email From DoNotReply@xxx.com Defines the email from address for sent
mail (the user usually sees this email
address)

xe_replyto Email Reply To ReplyHere@xxx.com Defines the "Reply To" email address for
sent mail (most systems will use this
address if the user hits "reply"). Requires
ABW 5.6.x or higher.

xe_subject Email Subject Statement <apar_id> Defines the email subject

xe_text Email Text Text for customer Defines the email text
<apar_id>

xe_addrtype Address Type 1 Defines the address type to be used


(defaults to 1=general)

xe_attid Address att id A4 Attribute ID to which the address is


attached

xe_attvalue Address att value <apar_id> Attribute value for this break point. NB
any string can be entered but should
contain a parameter in Excelerator
format that will evaluate to the
appropriate value for each split. defaults
to <xs_breakcol>

xe_addrid Address ID Explicit address id / link into agladdress


(some standard ARWs already provide
this information)
xe_except Exception report 0 Specifies if exception report containing
required items for which no email address was
found is required.

(default=1)

xe_reserve Reserve email admin@company.com Specifies an alternative e-mail address to


address use if the initial e-mail address causes an
immediate error.

xe_error Treat missing email 1 Tells ReportEngine to treat a missing


address as erro email address as an error (default=0)

xa_file1 File(s) to be attached C:\temp\myfile.pdf Specifies the fully qualified name of a file
to be attached to the emailed report
xa_file2 C:\temp\anotherfile.pdf output. xa_file2 will only be recognized if
xa_file1 is defined etc. ReportEngine
does not impose a limit on the number of
attachments although the underlying
email system might.

xa_doctype1 Document type(s) to ORDER Specifies the document type of the


be attached document(s) to be attached.
xa_doctype2.. INVOICE xa_doctype2 will only be recognized if
xa_doctype1 is defined etc. ReportEngine
does not impose a limit on the number of
attachments although the underlying
email system might.

xa_docindex1 Document index(s) to <client>,<apar_id> Document indexes corresponding to the


be attached document types defined with
xa_docindex2 <client>,<apar_id>,<seq> xa_doctype.
Filing (xf_)
ParamID Param name Example value Comments

xf_file File name for split Statement<apar_id> Defines where the split report output will
report output be put. xf_file may specify a relative but
not an absolute path. (see also xf_dir).

xf_password Password to be My_password Only applicable to pdf output files


applied to report
output file

xf_jpgsize Image quality in 10 Only applicable to pdf output files


exported pdf files
Set a value from 1 (minimum) to 100
(maximum) to control the size/quality of
images in exported pdf files. (default is
maximum=100)

xf_dir Directory name for C:\Report Output Specifies the root directory for split
split report output report output. If both xf_dir and xf_file
are specified then the file will be written
to a file named xf_file in directory xf_dir.
Note that parameter substitution does
NOT occur in xf_dir and the directory
must already exist. (defaults to the
current TEMP folder)

xf_dir Directory name for C:\Report Output Specifies the root directory for split
split report output report output. If both xf_dir and xf_file
are specified then the file will be written
to a file named xf_file in directory xf_dir.
Note that parameter substitution does
NOT occur in xf_dir and the directory
must already exist. (defaults to the
current TEMP folder)

xf_exists Split report file exists 0 Defines the action to take when a split
action report file already exists. Values are: 0
create a new file; 1 stop; 2 overwrite
the file; 3 skip to next file. The default
value is 0.

xf_missing Split report file is 0 Defines the action to take when a split
missing action report file does not exist. Values are: 0
create file; 1 stop; 2 skip to next file.
The default value is 0.
Miscellaneous
ParamID Param name Example value Comments

xc_required Indicates whether or 0 Values are: 0, 'N' do not produce a


not creation of a cache file; 1, 'Y' produce a cache file. The
cache file is required. 1 default 1 when running ARC on the report
server, 0 otherwise
Composite Report Files [.rerx]

Composite Report files are a way of packaging report files together with the data required to
run/render the report and produce the output. They are opened by the Report Engine client
application (ReportEngine.exe) and consequently Report Engine must be installed on the client
machine in order to process .rerx files.

Composite Report files contain all or some of the following constituent files:

Data Extraction (.resql) file


This file contains instructions to drive the Data Extraction process that will create the .NET DataSet.

_data.xml
This is simply a copy of the .NET DataSet containing the data for the report persisted as in xml
format.

Report File(s)
The input report definition file(s) e.g. myreport.xlsx or myreport.rpx

Properties
Properties are held in a hidden file called _properties.xml. The properties that control the way that
the .rerx file will be rendered.

FileName
This is the name of the primary report file. If the Composite Report file contains only one report this
is not mandatory, however, it is needed in the case of an ARC report that contains subreport .rpx
files as well as the main .rpx file.

FileName may also contain the special syntax "!new.report_type" where report_type is one of the
legal input report types: ".xlsx", ".xls", ".docx", ".doc", ".rpx", ".xml".

Reporter
This allows the user to specify which reporter object to use to render the report. Normally, this is
defaulted from the input file type.

Timeout
The rendering process will timeout after this amount of time.

OutputType
This is a used to override the default output file type for the given input file type. Valid output types
are:

Report Type Output Type


.xlsx, .xls (Excelerator) .xlsx, .xls, .pdf, .mht
.rpx (ARC) .rdf, .pdf, .rtf, .tif, .txt, .htm, .mht, .xls
.docx, .doc (Worderator) .doc
.xml (OpenXML) .xlsx, .docx, .xml, .csv
Report Engine SQL (ReSql)

Concepts

Report Engine SQL (.resql) files are always embedded within Composite Report Files (.rerx)

ReSql governs the process of extracting data from the database and/or an input .NET DataSet to
create an output .NET DataSet. This output DataSet will later be rendered to create the actual
report by one of the Reporter plug-ins (Excelerator, ARC, WordprocessingML) which, itself, has no
access to the database. Thus all the data for the report (but none of the formatting information)
must be included in the DataSet.

Grammar

ReSql files are plain text files. Lines in the resql file beginning with a full stop "." are command lines
that give instructions directly to the ReSql processor. All the valid commands are listed below. All
other lines contain SQL commands. These commands may be

Regular SQL commands that will be executed against the database


ABW specific extensions beginning with names like agr_ also executed against the database
DataSet-SQL commands that will be executed against the DataSet
DataSet-SQL commands must be prefixed with "dataset" to mean execute this statement
against the initial / input dataset or "this" to mean against the output dataset that is in the
process of being created.

All types of SQL as well as the contents of the command lines obey the normal SQL syntax for
quoting literals.

String literals are written with single quotes: 'my string'

Date literals are written 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss'

Numeric literals always require a "." decimal separator irrespective of the current regional settings
(as per SQL) e.g. 1 or 4.5 or -1.648e+5

Identifiers need not be quoted unless they contain spaces or other characters or begin with a
numeric in which case they are quoted with double quotes or square brackets:

my_table_name
[my column name]
"my column alias"
[1a]

Whitespace (including new lines) is ignored in all SQL commands.


Parameter Substitution
Parameters and data fields may be referenced within .if statements and within SQL commands as
follows:

$?parameter1 will be replaced by the current value of parameter1.

$:field1 will be replaced by the value of field1 from the current row of the table being looped
over.

$:table1.field1 will be replaced by the value of field1 from the last row that was added to
table1.

$$rowcount will be replaced by the number of rows affected by the most recently executed SQL
command.

Reference
.name
.name dataset_name

Sets the name that will be given to the DataSet that is created (DataSet.DataSetName). Normally,
this is the first statement in the .resql file.

.parserLevel
.parserLevel {asql|database|native}

Sets the default parser level to be applied to SQL SELECT statements (this can be overridden by
prefixing the individual statements if required). Note that "database" and "native" are synonymous.

.dbtimeout
.dbtimeout n

Sets the database timeout period to n seconds.

.declare
.declare parameter_name data_type default_value

Declares / Creates a parameter of the given name type and default value. .declare statements must
appear before any other statement (except .name, .*, .parsertype or .log) in the .resql file.

Parameter names may not contain spaces.

Valid data types are


string
int / int32 / int64
datetime
float / real / double

Examples

.declare my_string string 'hello world'

.declare my_int int 42

.declare my_date datetime '2013-06-12'

.declare current_time datetime 'now'

('now' is a special case which causes reportengine to set the parameter value to the current time)

.set
.set parameter_name = value

Sets the value of the named parameter. The parameter must have been previously declared,
otherwise an exception will be raised. The supplied value must be able to be converted to the
correct type for the parameter.

Parameters can be referenced in other statements as follows

.set my_number = 1
.set my_string = 'Hello World'

.set my_datetime = '2012-08-27 14:49:00'


.log Number = $?my_number, string = $?my_string, date = $?my_datetime

This causes the following to be written into the log file

Number = 1, string = Hello World, 2012-08-27 14:49:00

You may also use simple arithmetic expressions like this

.set i = 1

.set j = $?i + 1

The following operators are supported "+", "-", "*", "/" and "%" (modulo)

For string parameters only "+" (concatenate) is valid.

"%" (modulo) is only valid of integers.


.log
.log "text to appear in log file"

Causes the specified text to be written into the log file.

.* comment
.* this is a comment line

Any line beginning with .* is a comment and will be ignored

.if
.if condition
block1
.elseif condition2
block2
.else
block3
.endif

If condition is true then all lines in block1 are executed and lines in block2 and block 3 are ignored. If
condition2 is true then block2 is executed otherwise block3 is executed.

Conditions take the form of

[!] value1 (=|!=|>|>=|<|<=) value2

normally at least one of the values is parameterized

e.g.

.if '$?client' = 'EN'

.log "client is EN"


.else
.log "client is not EN"

.endif

.query
.query table_name
select_command

.endquery

Or

.query table_name select_command

Runs the sql command and creates a table named table_name in the DataSet containing the results.
.query main indicates that this is the main table that will be used to drive the report splitting if
the report is to be split.

.addRow
.addRow table_name
select_command
.endaddrow

Or

.addRow table_name select_command

Or

.addRow table_name
(select_command1) [prefix1], (select_command2) [prefix2] [, ...]
.endAddRow

Runs the sql command and adds the resulting row to the specified table. If the table does not exist it
is created. If it does exist the row is appended to the table. If the table exists but has a different
schema then an exception is thrown. If more than one row is returned an exception is thrown.

If used within a .loop a relation will be created from the .loop table (child) to the added table
(parent).

Note that in the case of .addRow you may join several select_commands using the third syntax. This
is very useful to create a well structured DataSet.

.addFirstRow
.addFirstRow table_name
select_command
.endAddFirstRow

Or

.addFirstRow table_name select_command

This is exactly the same as .addRow except that if more than one row is returned it takes the first
row and does not throw an exception. This can be useful but in most cases you should use .addRow.

.addRows
.addRows table_name
select_command
.endAddRows

Or

.addRows table_name select_command


Runs the sql command and adds the results to the specified table. If the table does not exist it is
created. If it does exist the rows are appended to the table. If the table exists but has a different
schema then an exception is thrown.

If used within a .loop a relation will be created from the .added table (child) to the loop table
(parent).

.loop / .group
.loop table_name
.group column1
[group block1]
.group column2 [,column3 [, ...]]
[group block2]
.endgroup [column1]
.endgroup [column2 [,column3 [, ...]]]

.endloop

Iterates through rows in specified table.

Statements in group block1 are executed once for each time the value of column1 changes

Statements in group block2 are executed once for each time the value of column1, column2 and
column3 changes

Groups may be nested as deeply as desired and the enclosed blocks of statement may contain .if /
.endif as well as .addRow and .addRows commands.

E.g.

.query main
SELECT client, account FROM ...
.endquery

.loop main
.group client
.addRow clients
SELECT client_name FROM acrclient WHERE client='$:client'
.endaddrow
.group account
.addRows details
SELECT description, amount FROM some transaction table...
WHERE client='$:client' AND account='$:account'
.endaddrow

.endgroup

.endgroup
.endloop
In this example there the column 'client' will be added to the 'clients' table as well as the
'client_name' and a relation from clients.client (parent) to main.client (child) will be created.

Also the columns 'client' and 'account' will be added to the 'details' table and a relation from
main.client,main.account (parent) to details.client,details.account (child) will be created.

NB. Using relations is a much more efficient way of saving the data as the header information is not
repeated for every row. You can make use of these relations using the 'EXPAND' keyword when
selecting data from the resulting dataset within an ARC or Excelerator report.

.relate
.relate table1.column1[,column2,] table2.column1[,column2,]

Creates a relation from table1 (the parent table) to table2 on the specified columns. This can be a
more efficient way of achieving the same result as using a loop structure when it is possible to select
all rows for the related table in one SELECT statement rather than using a .loop structure.

.exec
.exec command

Or

.exec

command

.endexec

Executes any of the following dataset sql commands that update the current dataset but do not
return a result set:

CREATE TABLE
CREATE TABLE name (column type [UNIQUE] [, column type [UNIQUE] [,
...]] )

CREATE TABLE name select_command

Where select_command may select from the database, the input dataset or the current dataset.

Creates a table in the current dataset. N.B. this does not update the database in any way.

DROP TABLE
DROP TABLE name

Drops a table from the current dataset. N.B. this does not update the database in any way.

INSERT
INSERT INTO table [(column1, column2, column3)] VALUES (value1,
value2, value3)
INSERT INTO table [(column1, column2, column3)] select_command

Where select_command may select from the database, the input dataset or the current dataset.

Inserts row(s) into the named table in the current dataset. N.B. this does not update the database in
any way.

UPDATE
UPDATE table SET column1 = value1|select_command1

[, column2 = value2|select_command2 [, ... ] ]

WHERE ...

Where select_command may select from the database, the input dataset or the current dataset.

Updates row(s) into the named table in the current dataset. N.B. this does not update the database
in any way.

DELETE
DELETE FROM table WHERE ...

Deletes row(s) from the named table in the current dataset. N.B. this does not update the database
in any way.

ReSql files only. Not applicable to reports.


Agresso specific Select Commands

In an ReSql file SQL command may either be regular SQL SELECT statements or one of the 'agr_'
macros listed below:

agr_getaddress
agr_getaddress client, attribute_id, dimValue, addressType [, sequenceNo]
agr_getaddress client, address_id

This will return a single row containing all available columns from table agladdress plus a column called
"formatted_address" containing the address formatted according to the ABW defined rules.
If sequenceNo is -1 or missing the first matching row (lowest sequenceNo) will be returned.
If sequenceNo is -2 the last (highest sequenceNo) row will be returned.

agr_getdescription
agr_getdescription client, attribute_id, dimValue [, language ]

Returns a single row containing the description of the given attribute value.

agr_getDocument
agr_getdocument client, docType [, index1 [, index2 [, index3 ... ]]]

Returns a single row containing the specified document.

agr_getText
agr_gettext textType, variant [, language]

Returns a single row table containing the specified text.

e.g. to fetch the statement text for report CS04:

agr_gettext '4', 1, '$?language'

agr_getSysConf
agr_getsysconf [client], name1 [, name2 [, name3 ...]]

Returns a table with columns named 'name1', 'name2' etc and a single row containing the values of
the corresponding System Configuration parameters.

agr_getTitles
agr_gettitles reportName, language, *|[id1 [, id2 [, id3 ... ]]]

Returns a single row with one column for each title. E.g.
.query titles
agr_gettitles 'CS04', 'EN', '*'
.endquery

will cause all the named titles for report CS04 plus the report header titles to be returned in English.

agr_getbrowser
agr_getbrowser template_name [, param1=value1 [, param2=value2 [,
param3=value3 ]]]

Runs the specified browser template with the given parameters and returns the results.

Parameters give must match those defined in the browser template. The internal names of columns
followed by one of the suffixes below must be given like...

dim1_eq for dim1 equal (or like)


dim1_ne not equal (or not like)
dim1_ge greater than or equal
dim1_gt greater than
dim1_le less than or equal
dim1_lt less than
dim1_in in list
dim1_ni not in list

Note that if the parameter is not given then the correct names of the required parameters are given
as part of the error message.
DataSet SQL available to Reports

Within an ARC or Excelerator report running against a DataSet the only way of retrieving data is with
the Select command. This is a limited version of the full SQL SELECT syntax and is described below.

SELECT
The DataSet SELECT command is a limited dialect of the SQL SELECT command that operates on
tables contained within a dataset. This is the only statement available within ARC or Excelerator
reports when agr.UseDataSetOnly or SQL parser = DataSet is selected.

The syntax is as follows:

SELECT {*|column1 [[as] alias1]|literal_value [as] alias1 [,column2 [[as]


alias2] [,column3 ...]]}

FROM [EXPAND] table

WHERE condition1 [AND|OR condition2 [AND|OR condition3 [...]]]

ORDER BY column1 [asc|desc], column2 [asc|desc] [, column3 ...]

Note that the FROM clause may contain only one table. The EXPAND keyword will cause the table to
be de-normalized such at all columns from parent tables will be included as if they were located in
the table itself.

Conditions
Conditions may be prefixed with NOT to negate their meaning and grouped together with round
brackets to force the order of calculation. (Otherwise AND takes precedence over OR).

Valid conditions are:

[NOT] column =|<>|<|<=|>|>= literal_value|column

[NOT] column IN(literal1, literal2 [, literal3 [...]])

[NOT] column LIKE('pattern')

pattern may contain % or * as wildcard characters either at the beginning or end (or both) of the
string. E.g. '*x' will match anthing ending in an 'x', 'x*' will match anthing beginning with an 'x', '*x*'
will match anything containing an 'x'. 'x*x' is not permitted.
Identifiers
Identifiers (column names, aliases and table names) are normally not quoted or can be quoted with
square brackets or double quotes to allow names starting with a numeric character or containing
spaces. E.g.

column1
[1a]
[my column name]
"another column"

String Literals
String literals are quoted with single quotes. If a single quote character is required within the literal
value then this must be escaped with a second single quote. E.g.

'my string literal value'


'O''Brian'

Date Literals
Date literals are written in yyyy-mm-dd [hh:mm:ss] format and quoted with single quotes. E.g.

'2013-06-11'
'2013-06-11 15:33'
'2013-06-11 15:33:55'

Integer Literals
Integer Literals are written simply as [+|-]n and are not quoted. E.g.

1
-32
+47

Real Number (amount) Literals


Real number (amount literals) are written [+|-]nnnn.nn and are not quoted. Note that as always in
SQL the decimal point is always written with a full stop "." and without thousands separators
irrespective of the current localization settings of the machine (i.e. always 1234.5 never 1,234.5
never 1.234,5). E.g.

1.3
-3.14159
+47.0

Boolean Literals
Boolean literals are written 1 or 0 and are not quoted. E.g.

0 (= false)
1 (= true)
List of Changes

8.28 build 157


This is a service update of release 8.28 containing only the following changes since 8.28 build 154.

1. Problems with installation of ReportEngine web-service under Agresso Milestone 4 update 1


have been resolved.
2. Newly generated ARC reports no longer generate agr.ParserType = 3 which lead to a runtime
error.
3. End users (without access to the Report Architect menu point) are no longer offered the
Default [.xlsx] or Design Report [.rerx] except in the Browser / Template Viewer. It
remains possible for a privileged user to import a template report which is available to all
users but they must take responsibility for not showing the user data that they should not
see.
4. Problem with the exception handling when running on the report server is resolved.
Previously, error messages would be reported as ERROR (-9999) Unknown error in CallReport,
now the meaningful exception message is shown properly in the log file.
5. Problem with Worderator reports stopping with message about not being able to load data
from data source is resolved.
8.28 build 154
This is a service update of release 8.28 containing only the following changes since 8.28 build 151.

6. Support for Agresso Milestone 4 Software Update 1 is added.


7. Problem with failing to write the distribution log to a csv file when splitting reports and
stopping the process is resolved.
8. Timeout period for rendering a report when running from Agresso Desktop (previously
Agresso Smart Client) is increased from 30s to 600s.
9. Performance of Export>Browser [.xlsx] is improved.
10. It is now possible to create a .rerx file with a reporter type of CSV or SpreadsheetML which
allows you to specify a timeout for new reports of these types.
11. Problem with refresh links in Excel sheets containing =AgrGetDescription() worksheet
function is resolved.
12. Fixed Save As in cache file (.rec) editor. (Previously it did nothing)
13. Problem with not focussing on the last sheet to be loaded when running Excelerator reports
from within an rerx file is resolved.
14. xe_error parameter is introduced which causes ReportEngine to treat a missing email
address as an error when splitting reports.
15. Problem with texts being truncated in Login screen with some screen resolutions is resolved.
16. When using Export>Browser [.xlsx] the name given to worksheet in Excel now reflects the
name of the browser template rather than always being Table1.
8.28 build 151
This is a service update of release 8.28 containing only the following changes.

Report Engine (shared functionality)


17. Serious performance problem on Self-Service on some installations is resolved. The
symptom was that the w3p process would use many seconds of processing time after
reports were successfully downloaded causing a problem for other users of the system.
18. Problem with files downloaded from ReportEngine in Self-Service using Mozilla Firefox
where the filename contained spaces is resolved.
19. The "Login" dialog is slightly improved notably the handling of ODBC connect strings.
20. "agr_getbrowser" now throws an exception if the user has specified parameters that are not
required by the browser template.
21. Spaces are now correctly ignored when using bracketed expressions in .addrow in .resql files.
22. Parsing of WHERE and ORDER BY clauses in DataSet SELECT statements is corrected.
23. It is now possible to add an xsl or xslt file to an rerx file which will be used to transform the
xml if xml output is specified.
24. It is now possible to use the "Cancel" button when displaying the log file in the progress
window.
25. Disallow .addrow main or .addrows main in .resql files.
26. Creation of new reports on report server is now run out-of-process in the same way as
existing reports. (This was only a problem for users of the new 64bit report queue in
Agresso Milestone 4)
27. Problem with SELECT ... FROM EXPAND ... where related values were null is resolved.
28. Problem with not being able to view the log file from Self-Service under Agresso 5.5.3 is
resolved.
29. The Web-Service version number is now displayed in the response from A_Test.

Report Creator
1. The ARC Designer reverts to pre-8.26 behaviour and no longer locks it's input files (except
when being used from within ReportEngine.exe).

Excelerator
1. It is now possible to specify the server queue to use to render Excelerator reports
initiated from Self-Service using the system parameter RE_ORDER_QUEUE.
2. Problem with "Sequence contains no elements" error when exporting to "Browser
[.xlsx]" in the case where the browser screen is displaying no data rows is resolved.
3. Negative numbers are now shown in red in .xlsx files exported via "Browser [.xlsx]" and
"Default [.xlsx]".
4. Under Agresso Milestone 4 "query balance" is now enabled provided that no relations
on attributes where "dates on relations" are referenced. (Previously "query balance"
was entirely disabled for Milestone 4).
5. Problem with 3 or 4 character client codes when using "query balance" is resolved.
6. There is a new "hide" row available in Excelerator to allow the user to specify that entire
columns in the report should be hidden after the report is loaded.
7. Problems with association of incorrect data with Excelerator reports when running from
within the Excel Addin are resolved. In particular the data was never properly associated
after using "Tools>New Report..."

Worderator
1. Problem running Worderator reports from within the ReportEngine.exe UI is resolved.
2. When running a Worderator report from Self-Service the report is streamed to the client
as a .rerx file and processed on the client machine. Note this will only work if
ReportEngine is installed on the client machine. Previously such reports always.
3. A report containing only one column of data now fails cleanly.
8.28
This release contains the following changes since 8.26 (8.27 was never made publicly available).

This is the first release in which the "ReportEngine SQL" feature is fully supported. Many
enhancements in this area have been made since 8.26/8.27 which contained a pre-release version of
this feature. Using this feature reports can be made compatible with the new 64bit server queues in
ABW 5.7.0.

The Samples have been updated to reflect the fact that this will become the preferred way of writing
reports in the future.

It is stressed that all existing reports not using this feature will continue to work in all contexts in
which they previously worked.

Also, any report that does use this feature will work equally well in 32bit environments back to ABW
5.5.3.

Report Engine (shared functionality)


1. There is a new "Browser [.xlsx]" option on the "Export" menu which is available in all
Browser (Smart Client) and Template Viewer screens (Self-Service). This option creates a
.xlsx file that preserves the Browser template formatting, including subtotals. The important
difference is that this functionality does not use MS Excel and is run directly on the web-
server and gives the user a "one-click" way of getting the data into .xlsx. This is very much
more efficient than creating an Excelerator report and running that.
2. Memory usage and performance when running as part of ABW Self-Service has been very
greatly improved.
3. 1900-01-01 is now converted to NULL in all data scraped from ABW screens or returned by
the ABW QueryEngine. This behaviour can be inhibited by setting a system parameter called
RE_1900_01_01="1" if you really do want null dates to show as 1st January 1900 in your
reports.
4. The description of SearchList controls in TopGen screens is now added automatically to the
dataset scraped from TopGen screens. E.g. In the Resource Name field in the Timesheet
Entry screen the dataset now contains resource_id_description as well as resource_id.
5. Intermittent problem with opening output .xlsx and .docx files is resolved.
6. Login screen has been enhanced and support for windows password authentication is
added.
7. Parameter names generated from Template Viewer screen for "between" type constraints
have been corrected.
8. There is a new "xd_archive" parameter to allow the user control over which archive/client
the document is archived to.
9. New macro agr_getbrowser template_name, param=value,... is introduced
which should be used in preference to "agresso template_name"
10. agrxlcmd.exe is now a 64bit program. If you want to run an Excelerator or ARC report from
the command line you now need to use agrxlcmd32.exe which has the same functionality.
Report Creator
1. Problem with .cnv files remaining locked after the ARC designer has been closed is resolved.
2. In the ARC Designer the report will now be re-run if _data.xml has been modified since the
last run.

Excelerator
1. Excelerator reports initiated from Self-Service no longer cause a ".rerx" file to be streamed
to the client machine. Instead the report is automatically "ordered" and run on the report
server and can be viewed from within the "Export" dialog where it was ordered. (If
ReportEngine is installed on all client machines and you wish to continue to use the old
behaviour please create an AppSetting called ReportEngineExceleratorAsRerx in the main
self-service web.config file <add key="ReportEngineExceleratorAsRerx" value="1" />)
2. SQL generated by "query balance" is now always forced to execute in "Native" mode to
avoid problems with the "ASQL" parser on some versions of Oracle.
3. "query balance" does not work in conjunction with ABW 5.7.0 due to introduction of dates
on relations. Please use agr_getbrowser... instead.
4. There is a new "getdata" keyword for use in the _control sheet when working in
"DataSetOnly" mode. This allows you to connect to the web-service and retrieve the entire
dataset for the report (see body of documentation).
5. Problem with processing of Sub-Total break points when data contained nulls is resolved.

Worderator
1. Problem with saving files as .docx with Word 2007 has been resolved.
8.26 build 137
This is a service release of 8.26 containing only the following changes since 8.26 build 124.

Report Engine (shared functionality)


11. The ReportEngine designer user interface is substantially improved. (The runtime UI is
almost unchanged)
12. On Smart-Client and Self-Service the "Client" parameter now correctly returns the current
client rather than the logged in / session client.
13. Date, Amount and integer columns are now formatted correctly when creating a "Default
[.xlsx]" file.
14. Dates are written to csv files as ANSI date strings (yyyy-mm-dd hh:mm:ss).
15. Problem with "Failed to CreateTempDirectory" when sending an e-mail with attachments on
a very busy machine is resolved.
16. Problem with agr.GetDescription, agr.GetAddress etc when no attribute id or value was
specified is resolved. Problem was introduced in 8.26 and partially fixed in 8.26 build 124.
17. The distribution dataset now contains an additional field called page_count which is
populated by ARC with the number of pages in each split file.
18. The distribution report is no longer sent to xe_reserve unless errors are encountered.
19. Problem with Excelerator reports being shown as [.xlsx] rather than [.rerx/.xlsx] in self-
service is resolved.
20. All temporary files and folders are now created under a folder called "ReportEngine" under
the current TEMP folder.
21. Error when exporting data from a TopGen screen with deleted rows is fixed.
22. Introduced new parameter xe_replyto which sets the "Reply To" address on emails sent by
ReportEngine. (Requires ABW 5.6.x)
23. Treatment of "Column format" (1000) and (1 000 000) is now the same from Smart Client
and Self-Service. The returned number is now always divided by 1000 or 1000000 as it has
always been in Self-Service. The number format in Excel and ARC is now also correctly set to
"0" rather than "0.00" for these columns.
24. There is a new /edit switch on agrxlcmd meaning open the file in design mode creating it if it
does not exist. E.g. agrxlcmd /edit:myfile.rpx /data:data.xml
25. Performance of web-service is greatly improved when retrieving large data volumes.
26. The icon has been changed from an "A" to an "R" in the ABW Route 66 style.
27. Problem with corrupt Default [.xlsx] files when table has more than 52 columns is resolved.
28. Default [.docx] now fails gracefully if the limit of 63 columns in a Word Table is exceeded
rather than creating a corrupt .docx file.
29. Problem with "access violation" exception when using ReportEngine from within the VP10
transaction entry screen in Smart Client is resolved.

Report Creator
3. agr.GetRecordSet no longer fails if data contains nulls
4. The ARC Designer now locks its input files (.rpx / .cnv)
5. Agr.SelectInto now has an optional prefix parameter which allows you to prefix all the
formula names.
Excelerator
6. Problem with "Method ~ of object ~" error when manipulating a report with 703 or more
columns (column AAA) is resolved.

Worderator
2. No Changes.
8.26 build 124
This is a service release of 8.26 containing only the following changes.

Report Engine (shared functionality)


30. Problem with "You are not authorized ..." errors appearing even when the user did have
sufficient privilege when using the web-service are resolved. These occurred especially but
no exclusively when using Single-Sign-On and with Post-Back.
31. Problem with time zone offset being applied to dates when being rendered in a different
time zone to that where the rerx file was created is resolved.
32. Spurious error messages during installation against ABW 5.6.x are removed.
33. ">>>> Cannot Resolve ..." messages removed from log file.
34. Horizontal scroll bar has been added to dataset (also .rec file) view in ReportEngine.exe.

Report Creator
1. Problem with agr.GetDescription, agr.GetAddress etc when no attribute value etc was
specified is resolved. Problem was introduced in 8.26.
2. When automatically creating a data cache file (.rec) (i.e. running an ARC report where
xc_required has not been specified) writing to the cache file is disabled after caching 500
methods. Most reports never reach 500 methods in the cache so this makes no difference.
However, for reports containing sub-reports or agr.SelectInto at the detail level this may
represent a very serious reduction in the execution time for the report.
3. Revert to generating new reports with ParserType=1. In 8.26 build 121 it generated
ParserType=3 (DataSet based) reports which was inconvenient for further development of
the report.
4. Problem with not being able to use SQL in ARC reports within Self-Service even when setup
to call back via the web-service is resolved.
5. Problem with agr.GetDescription and agr.GetDocument always returning values from the
current client even if a different client was specified is resolved.

Excelerator
3. "concat" keyword now excluded blank values.
4. Problems with Planner PostBack in Validate mode have been resolved.
8.26
Changes between 8.25 and 8.26

Report Engine (shared functionality)


35. Support for ABW 55sp2 is removed
36. Support for "Agresso Client" type login is removed (including for ABW 5.5.3)
37. A short-cut to ReportEngine.exe is now added to the Windows Start Menu
38. The installer (AgrxlInstall.exe) now continues searching for valid installations of ABW past
the most recent one that it finds in order to work properly on machines with more than one
version of ABW installed.
39. The content of the Help files have been updated and replaced by this single .pdf file.
40. Agrxlcmd.exe now uses side-by-side activation of COM via manifest files to avoid any
registration
41. Reports may now be split on a combination of columns: xs_breakcol=column1,column2
42. Parameter xa_file1, xa_file2 etc revert to these original names after being inadvertently
renamed to xa_file_1, xa_file_2 etc in 8.25
43. Database timeout is now correctly passed through from the client to the web-service to
avoid the database continuing to process a request after the web client has timed out
anyway.
44. New parameter xs_nolog is available to inhibit logging originating from split reports.

Export Functionality
1. Change "Reports" to "Export" on Self-Service menu bar as this better reflects the options
available especially to an un-privileged user.
2. Export to .docx files is now supported. This creates a document containing a single table
suitable to be used as an MS Word Mail-Merge data source.
3. Parameter values are now available when running reports from the template viewer within
Self-Service
4. Problem with new lines in data exported to default [.csv] is resolved.
5. Date values exported to .xlsx and .csv are now correctly converted to OLE Automation
format.
6. Handling of non-ascii charancters when exporting to csv is improved.
7. Exporting or running a report against a screen with no data no longer causes an error it
just makes an empty report.
8. Screen scraping from Smart Client Browser screens has been improved and now preserves
descriptions in Browser Templates with "sub-total logic".
9. Hidden columns in TopGen screens are included in the DataSet but unless you are a
ReportArchitect the values are null

Report Creator
6. Setting agr.ParserType = 3 means that the report will get data ONLY from the supplied
dataset logging on to get further data will not be allowed

Excelerator
5. The original protection status of a worksheet is now automatically preserved when loading
and unloading
6. Problems with version of .NET required by Excelerator Add-in conflicting with some other
Excel Add-in are resolved. Excelerator used to demand .NET CLR 2.0 now it first tries CLR 4.0
and reverts to CLR 2.0 if that fails probably because CLR 4.0 is not installed.
7. ParserType=DatatSet means that the report will get data ONLY from the supplied dataset
logging on to get further data will not be allowed
7. Problem opening running Excelerator reports from remote locations specified by a uri type
filename is resolved
8. New keywords REF=n, REF>n and REF<n are introduced for comparators meaning select all
rows which have been used exactly n times, more than n times and less than n times
respectively. (REF=0 is exactly equivalent to ELSE)
9. New Excelerator reports are now created as .xlsx rather than .xls if the user has Excel 2007
or higher installed.

Worderator
1. Problem data containing new lines is resolved. (problem introduced in 8.25)
8.25
Changes between 8.24 and 8.25

The most important and visible change in this release is that the ReportEngine UI within the ABW
Smart Client and Self-Service screens is very much improved and rationalized such that the same
functionality is available in both cases.

Report Engine (shared functionality)

1. GL07 post-back will no longer use incorrect user_id (SR 163044/167799)

2. SendMail method now works correctly with ABW 5.6.x/Route 66. (SR 167856)

3. Non-browser enquiries are now recognized and summary totals generated when Extracting to
Excel also recognize Sigma characters on ABW 5.6.x/Route 66 (SR 166537/167749)

4. "Can't set DataSetName to zero-length string" error no longer occurs when "template" field is
empty when running from Agresso Browser/Template Viewer.

5. "object reference" errors no longer occur on initialize in SelfService TopGen Screens (SR 162006)

6. Installation now includes AgrOdbcExporterLib.dll

7. Installer has been enhanced and now allows the possibility of viewing the AgrxlInstaller log file.

8. It is now possible to import all types of report including Worderator and ARC reports containing
sub-reports against Self-Service screens.

9. Distribution report is replaced by Errors report which is the same except that it contains rows
only for iterations of the report for which the distribution failed. If there are no errors then no
errors report is produced. However, a csv distribution report will be emailed to xe_reserve if it is
defined.

10. GetDocument() now functions correctly for multi-page Tiff files.

11. Documents returned by GetDocument() are now included in the data cache (.rec) file.

12. Cache file (.rec) is now properly saved on logout from ARC Designer / Excel Addin (problem
introduced in 8.24).

13. When inserting documents into the archive, if xd_title is not specified then the filename is used
by default filename.

14. Support for logging in to ABW 5.6.x / Route 66 via Agresso Client connection is withdrawn.
15. Problem with ImportReportFile/distribution report is resolved. (problem only ever existed with
ABW 5.5sp2)

16. Report files can be packed into Composite Report files (.rerx) for import into ABW. This allows
the import of ARC reports containing sub-reports and/or canvas files.

17. dataset SELECT syntax has been expanded to allow a column list. dataset SELECT col1, col2
FROM table WHERE

18. Problem with SQL containing $ functions not being found in cache files (.rec) is resolved.

19. Logging in web-service is improved / no longer generates very large log files.

Report Creator

1. Problem with SQL editor hanging if SQL contained ? preceded by an alphanumeric (e.g. 4?) is
resolved.

2. Spurious error when case of printer name set up in ABW does not match actual Windows printer
name. I.e. my_printer vs. My_Printer no longer generates an error.

3. File>Save As in the ARC designer now allows the possibility of saving as a Composite Report
file (.rerx) for import into ABW. This will include sub-report and canvas files that can be located. If
there is a need to add further files this can be done by opening the .rerx file and using File>Add
File

Excelerator

1. Date columns now generated with locale dependent formatting (m/d/yyyy)

2. setdefault client is no longer overridden by blank value of client(SR 167229)

3. _data sheets are no longer created or refreshed.

4. Problem with query agresso not finding the results of the query defined in the _query sheet is
resolved. (problem in 8.24)

5. Validate mode for planner postback now exists.

6. New reports generated from pre-browser enquiry screens now include grouping inferred from the
screen
7. Security rules for posting back via web-service are corrected.

8. There is a new system parameter called RE_POSTBACK_AS. If this exists and has a value other
than 0 or blank then users will be allowed to override the logged in user_id with the value of the
user_id parameter when posting back.

9. Database Timeout is now applied to the web-service when running sql

10.

Worderator

1. Saving data as csv now copes properly with leading underscores and nulls. (These can occur when
data originates from template viewer screens in self-service.

2. Problems with data containing Unicode characters are resolved.


8.24
Changes between 8.23 and 8.24

The most important changes in this release are probably the first 4 under Report Engine (shared
functionality)

Report Engine (shared functionality)

1. Installation / Deployment has been considerably simplified (see Installation Note)

2. The Self Service UI has been very considerably improved including the facility to export browser
template screens to csv files. This is useful as it runs entirely on the web-server and most machines
have software installed that can read a csv file (MS Excel or Open Office).

3. Report Splitting / Distribution Report. Whenever a report is split a secondary report is created
and added to Maintenance of Ordered Reports showing the user how the report has been split
and distributed (email, doc archive, file, print). There are no parameters controlling this, it will
always happen.

4. Report Splitting process no longer stops if distribution error (email or doc archive) is encountered.
This includes the case where an attribute status is closed and so the doc archive rejects the
document. NB. This means that it becomes important to check the distribution report referred to
above.

5. The system consistently only asks the user to log in when it is really required. This considerably
improves the user experience when working with data only reports such as those generated from
browser screens.

6. The concept of being connected to a DataSet is separated from the concept of being Logged in.
Important for developing ARC reports to be imported via the web UI.

7. ARC_DEF_FILETYPE / ARC_DEF_WFILETYPE are now respected when running on Agresso 5.6. I.e.
We have reverted to the original behaviour in 8.23 on 5.6 only these parameters were ignored.

8. Print state of "Check publisher's certificate revocation" in log file.

9. Problems with prompting for a parameter called "User" when running browser templates are
resolved.

10. Problem with blank date parameters in browser templates leading to "invalid date parameter ''
errors is resolved (introduced in 8.20)

11. The full SQL of every user query is now shown in log file.

12. Problem with Error handling in calls to underlying agrlib are resolved (caused misleading error
messages from SendMail)
13. Problem with split report output files specified by xf_dir\xf_file being removed when they are
also emailed or sent to the document archive is resolved.

14. Treatment of 64bit integers (e.g. transaction_number) scraped from Browser screens is
corrected. Previously these were seen as real numbers/amounts rather than integers causing a
particular problem in the Extract functionality but also elsewhere. (sr 142962)

15. New Query syntax. Select prefixed with dataset means get the data from the current dataset
rather than the database.

Report Creator

1. Nested sub-reports are no longer re-created for each instance of the section in main report. This
used to lead to excessive use of memory and eventually to an XML invalid error (especially in
North American travel reports)

2. Set printer orientation when printing from ARC designer and RDF viewer to prevent incorrect
printing.

3. Check paper size before printing / offer to shrink to fit if interactive useful when printing a
report laid out for Legal on A4 paper for example.

4. A warning message is printed in the log file if Printer.DeviceName is not properly set. (an invalid
name sometimes does not cause an immediate error in the underlying code)

5. Add check for rpt.toc.add in verify - must be in OnBeforePrint

6. A Warning is printed in the log file if agr.ParserLevel not specified

7. Intermittent problem with direct printing of rdf files is resolved.

Excelerator

1. Excelerator reports can now be saved as PDF and XPS if using Excel 2007 or higher

2. Very serious performance problem concerning FindConditionalFormatting when running out-of-


process with Excel (i.e. on the Report Server) is corrected. This can make a very significant
difference to the execution speed of Excelerator reports on the report server.

3. Error that occurs when trying to load sheet in a workbook that is not enabled for editing is now
properly handled. (This is the default state when opening an xlsx file received as a mail attachment
in Outlook.
4. It is now possible to generate a new report based on SELECT statement as well as on a browser
template.

5. Now able to open and xlsm and xlsb as well as xls/xlsx (previously on report server you were only
able to save as xls even if the input file was an xlsx)

6. Server process is now launched as client/user_id specified by parameter when posting back. I.e.
we have reverted to behaviour as per 8.16 to avoid problems with post-back.

7. Detect if selection criteria have been truncated to 255 characters by copy of sheet (Excel2003 and
below)

8. Require x_needs_arw in order to run the arw for xls files. (Invoking and closing Excel twice in quick
succession is not only inefficient but caused a crash if the MS Office live update add-in was
installed.)

9. Problem with multiple update_columns and crosstab rows in post-back sheets is resolved.

10. Problem with method ~ of object ~ when loading a workbook/xls file in which a group of sheets
selected is resolved.

11. Precedence of parameters when ordering GL07 is corrected

12. When running on Report Server Excelerator will stop immediately with a clear error message if it
detects DCOM settings which would cause a later error. (user=LocalSystem and RunAs set or
LoadUserSettings not set).

13. The correct DCOM settings are now set as part of the installation
(AppID/{xxx}/LoadUserSettings=1)

14. Problem when exporting from browser templates containing descending sort orders is resolved.

Worderator

1. No Changes
8.23
Changes between 8.22 build 134 and 8.23

The most substantial change in this release that it is the first to be compatible with Agresso 5.6. But
please note that it remains compatible with Agresso 55sp2 and 553.

Report Engine (shared functionality)

1. Agresso 5.6 compatibility.

2. There is a new switch in the Excelerator Options dialog and on the ARC Designer menu called
Connect to Agresso 55. This is checked by default but must be unchecked in order to connect to a
client installation of Agresso 5.6.

3. $TODAY etc may now be given as a parameter to Query Engine

4. There is now an English translations file so that options can be removed from the menu by setting
text="-"

5. Pdf / xls buttons only appear in Self-Service menu for non-Report Archictect users in Template
viewer screen and other screens where a template report has been imported.

6. Problems with name clashes in Planner Transaction entry screen (and potentially others) in Self-
Service are resolved.

7. When generating a new report from a Browser Template with Sub-Total columns where the Sort
column is left blank the Sub-Totals are now properly respected.

8. The xs_filetype parameter may now, itself, contain parameters.

9. Browser Template names containing single quote characters no longer cause an error.

10. ODBC connection dialog is replaced by a simple File Open dialog prompting for a .dsn file. To
use this please first create a .dsn file (File DSN) in the Windows ODBC administration screens.

11. AgrxlRegister.exe is now marked as requireAdministrator so as to comply with User Access


Control (Vista, Windows 2008 Server, Windows 7) and now installs the Excelerator Add-in for all
users who have previously used Excel on the machine not just the current user.

12. Problem with Screen Sizing in Login screen is resolved.

Report Creator
1. When running on the Report Server the whole report output (the file that will be visible in
Maintenance of Ordered Reports and/or printed) will always be created as rdf. Split report output
will be created as pdf unless overridden by the xs_filetype parameter.

2. ARC_DEF_FILE_TYPE, ARC_DEF_SFILE_TYPE and ARC_DEF_WFILE_TYPE are no longer respected.


(xw_filetype will still be respected but creating anything other than rdf for the whole report is NOT
recommended).

3. The RDF viewer now remembers the Zoom setting as well as the screen size from the last time it
was used.

Excelerator

1. If >1000 rows containing conditional formatting to be inserted under Excel 2007 and 2010 a
warning is printed in the log file. This is no longer an error. BUT please note that this can lead to
serious performance problems due to the dubious implementation of conditional formatting in Excel
2007/2010.

2. Problem with loading xls files containing macros where sheets were copied into new workbooks
for distribution/splitting has been resolved. Previously, this situation sometimes lead to the process
hanging.

3. Added defensive code to prevent errors when user attempts to create > 8 outline / grouping levels
(build 138)

4. Extract / Snapshot now works properly on non-browser enquiry screens (failed to apply grouping
in 8.22) (build 138)

Worderator

1. No Changes
8.22 build 134
Changes between 8.22 build 131 and 8.22 build 134

This build is a minor release containing only the following corrections to 8.22 build 131. These are
almost exclusively connected with functionality that was entirely new in 8.22.

Report Engine (shared functionality)

1. ReportEngine now works in Template Viewer screens based on system browser templates within
the main menu. (previously only worked in the Reports menu).

2. There is a new Parameter called x_needs_arw. This prevents ReportEngine from looking at rpx/xls
file to determine if the report requires the output from an arw. Set this value to 1 if the report
does require the output of an ARW or 0 in the normal case where the report contains its own SQL.
If the parameter is not defined then the system will behave exactly as previously and open the
report file to determine this itself. Setting this parameter will save a great deal of time (small
Excelerator reports will run twice as quickly) and prevents a problem with Excel hanging which used
to occur under some circumstances.

3. Problem with ReportEngine ACT dlls causing an "object reference" error when entering some
some TopGen screens in the smart client is resolved.

4. Problem with "trying to deserialize an empty stream" when opening .rer files is resolved.

5. Problem with ReportEngine leading to the following error occurring in Web screens is resolved.
Processing of the current screen has been terminated because the user attempted to navigate to a
previous page. This is prohibited for data integrity reasons. This only affected systems to which the
most recent updates to Agresso 55sp2 or 553 had been applied.

6. Problem with "cannot remove primary key" error when using ReportEngine from some TopGen
screens is resolved.

Report Creator

1. PDF files created with a password now have the "allow printing" property set so that they may be
printed from within the Adobe pdf reader.

2. Problem with agr.RenderMode = 1 when running on ReportServer is resolved.


Excelerator

1. Problem with "RowDefs.Item - invalid pointer" when removing control information where report
contained "header,page" is resolved.

2. SQL generated by the query balance feature is now included in the log file.

3. Up to 250 rows containing conditional formatting are allowed to be inserted under Excel 2007 and
2010 (previous (build 131) limit was >200 underlying rows of data which was too severe).

Worderator

1. No Changes
8.22
Changes between 8.20 and 8.22

Headline features of this release are the availability of ReportEngine functionality in Self-Service
screens and greatly improved Excelerator Post-Back although there are many other enhancements
as listed below.

Report Engine (shared functionality)

1. Report Engine functionality is now available in Self-Service screens. This includes:

a. The creation of a pdf file based on the information available in the current screen. This processing
occurs on the Web server there is no requirement for any additional software on the client
machine.

b. The creation and running of Excelerator reports based on information available in the current
screen. This is achieved by the creation of an intermediate file (.rer) on the web-server which is
streamed to the client machine. This requires a standalone installation of ReportEngine (and MS
Excel) on the client machine to open the .rer file and create/run the report.

2. Report Engine functionality is now available in TopGen screens within the Agresso Windows
Client. (ACT dll needs to be installed)

3. Protection of the database connection is improved.

4. Problem with the user being presented with the Login dialog even when Single Sign On was
enabled is resolved (SR70416)

5. All pages of multi-page TIF files stored in the document archive are now attached properly to
emails (as a single multi-page TIF file). Previously only the first page appeared.

6. SQL statements may now be prefixed with the keyword ASQL which will force the use of the
Agresso SQL parser even when the SQL parser level is set to Native. I.e. this is the exact opposite
of the DATABASE keyword.

7. When running reports based from the Agresso Browser screen or Template viewer the data types
of all columns is now correct. Previously there was a problem with columns originating in Flexi-
Fields which had a particularly bad effect for dates.

8. Problem with fatal error when Report Splitting in the case where the driving query returns no
rows is resolved.
9. The rules for applying timeouts to secondary data sources are now exactly as per primary data
sources. (Previously secondary data sources always had the default timeout - usually 30s).

Report Creator

1. Importing a report containing sub-reports and/or canvas files on the Agresso window client no
longer causes an error.

2. Use of $breakcol parameter in Edit Query window now functions properly (syntax is
$?$breakcol).

3. Problem with use of agr.SetCanvas and agr.SetPaperBin in the same report is resolved.
(previously this caused the PaperBin to be ignored).

4. RDF viewer now properly respects copies and pages specified in the print setup dialog.

5. RDF viewer has a new File>Save Pages As option which allows the selection of a page or range
of pages to be included in the exported file.

6. Split report output can now be printed as it is created by setting a parameter named xs_print to
1. This can often remove the need to create a single unsplit report containing all the data which
often takes more time and resources than the rest of the process put together.

7. A new property is available to allow the user to specify agr.RenderMode=1 (no other values are
valid). This forces ARC to apply this property when the report is printed. In general this produces a
much reduced print quality but is required on some dot matrix printers to avoid the text from being
distorted (usually squashed up).

8. Agr.GetDocument() will now convert TIF documents to a format that can be used in the image
control on the fly. This allows scanned images to be stored as TIF files in the document archive
which is probably the best format for such images. Note: Consider using 1 bit per pixel i.e. black and
white if your scanner supports that.

9. The generation of default reports from Browser / Template Viewer screens has been considerably
improved especially where sub-total logic has been used in the Browser Template.
Excelerator

1. Excel 2010 is supported.

2. The Post back feature has been considerably improved.

a. Problem with GL07 processes being initiated with some or all parameters missing is resolved (only
affected the web-service connection)

b. It is now possible to have multiple update_crosstab rows.

c. GL07 post-back processing now occurs on the server and is considerably more efficient and
secure.

d. GL07 post-back is now available when using an ODBC connection to the database.

e. Post-back to other batch import tables and processes is now available. If one of the following
processes is specified in the update_columns row then the data will be placed in the corresponding
batch input table and the server process will be ordered. If the name of the table is specified then
the data will be loaded into the table but the process will not be ordered. Processes: GL07, LG04,
AT08, AT09, CS15, TR01. Tables: acrbatchinput, algbatchinput, aatassetinput, aatbatchinput,
acsheaderinput, atrimport.

f. A new option on the Tools menu allows you to create a simple postback template listing all
available columns.

3. There are considerable performance improvements when inserting and removing large numbers
of rows from Excel.

4. There is a new option entitled Return 1900-01-01 as blank in date columns. This will cause all
dates with this value (the canonical null date in Agresso) to be returned as blank/null. This will be
set in all newly created reports but is not set automatically for existing reports because of potential
(but unlikely) compatibility issues if the column is an input to an Excel Formula. (This was done to
avoid the use of conditional formatting which becomes very inefficient in Excel 2007 and Excel 2010.

5. The limit on the maximum number of rows to insert has been removed.

6. Insertion of outline grouping now respects and is compatible with any pre-existing outline
grouping in the worksheet.

7. It is now possible to disable any item in the Excelerator Add-in menu by setting text=- in the
Translation.LL.xml file. (where LL is the current language code).

8. It is now possible to select an xlsx file from Report Architect > Existing Report.

9. An xlsx file will now be found and run on the report server if output type Excelerator is selected.
(Auto-select still does not work in 55sp2/553)

10. When running on the report server query,n agresso now triggers running an ARW file to
extract the data. (As query agresso has always done)
11. Add-in file agrxl8.xla is now digitally signed.

12. Giving create access C to the Report Architect menu will now allow users to use the query
balance feature in Excelerator without granting the user the right to run user-defined SQL.

13. cc address is removed when emailing to xe_reserve address after and email failure.

14. Tools>Lookup now functions properly against Agresso 553.

15. xe_excel parameter no longer has any affect

16. The generation of default reports from Browser screens has been improved.

Worderator

1. No Changes

8.20 build 124


Changes between 8.20 build 123 and 8.20 build 124

Report Engine (shared functionality)

1. Documents or files specified by the xa_* parameters or agr.Attach* methods are now correctly
attached to emails. (In previous releases this worked against Agresso 553 but not 55sp2, in 8.20/123
this did not work with either 553 or 55sp2)

2. The rules for applying timeouts to secondary data sources are now exactly as per primary data
sources. (Previously secondary data sources always had the default timeout - usually 30s).

Report Creator

1. Split reports may now be printed as they are created. To do this use a parameter called xs_print
and set its value to 1.

2. Agr.GetDocument() will now convert TIF documents to a format that can be used in the image
control on the fly. This allows scanned images to be stored as TIF files in the document archive
which is probably the best format for such images. Note: Consider using 1 bit per pixel i.e. black and
white if your scanner supports that.

Excelerator

1. No Changes

Worderator

1. No Changes
8.20
Changes between 8.16 and 8.20

Report Engine (shared functionality)

1. Intermittent failures of server based reports where parallel queues were in use is resolved.
Symptom was Unrecoverable Error in the log file.

2. Login is always required when working from ARC Designer or Excel Add-in.

3. Progress window is no longer left on the screen covering the Logged In. message after logging
in.

4. Progress window is no longer marked as TopMost which had the effect of leaving it visible even
if the user switched to another application.

5. The efficiency of the web service type connection is very significantly improved in terms of both
speed and memory usage on both the client machine and the web server. Note that older versions
of ReportEngine cannot use the new web service and vice-versa.

6. The efficiency of handling large volumes of data is improved.

7. Intermittent login problems when running on server under Agresso 553 are resolved (problem
introduced in 8.16 and only affected 553).

8. Problem that prevented Oracle runtime dlls from being found under some (rare) circumstances is
resolved.

9. Problem with a server process parameter named client being defined but left blank is resolved.

10. New xe_from parameter that allows user to specify the from address when reports are
distributed by email.

11. Problem with Web server returning the following error is resolved Could not load file or
assembly Agresso.ReportEngine Version=1.0.0.3

12. Problem that occurred generating reports from a browser template with a name > 30 characters
long and in which the 30th character was blank is resolved.

13. Parser Types / Levels have been renamed 1=Native, 2=ASQL.

14. When running Browser Templates which include a prompt for a parameter named client (often
displayed as company ReportEngine will now prompt the user even though a parameter called
client will always pre-exist. To prevent this behavior it would be necessary to define a parameter
called company (or the multilingual equivalent of company)
15. Command line utility agrxlcmd will now accept rdf files as input. Useful in the following case:
agrxlcmd /in:myfile.rdf /out:myfile.pdf /p:xf_jpgsize=10

16. New clean mode in agrxlregister.exe

Report Creator

1. Problem with Object variable of with block not set error after export of report output from ARC
Designer is resolved.

2. agr.GetRecordSet() now leaves the cursor positioned at the first row as was the case before 8.16.

3. AgrxlRDFComparator.exe is replaced by AgrxlARCViewer.exe /cmp file1.rdf file2.rdf

4. Changing an agr.UseParameter in the ARC designer now takes immediate effect. You no longer
have to close and re-open the designer for the change to be registered.

5. There is a new GetFile() method on the agr object. E.g. agr.GetFile(c:\mypath\myfile.bmp) that
can be used in a similar way to agr.GetDocument() in order to set the picture property of report
controls. NB agr.GetFile(myfile.jpg) will look for myfile.jpg in the same folder as the rpx file in
which it is running. i.e. often in Customised Reports.

6. ARC designer user interface code is moved from AgrxlARC001.dll to AgrxlARCViewer.exe. This
does not have any effect on functionality. The change is noted here only because the sizes of these
files are dramatically changed.

7. New xf_password parameter to allow specification of a password on pdf files created from ARC
reports.

8. New xf_jpgsize parameter to allow control over jpg image quality when writing the output of ARC
reports as pdf. Should be set in range 1-100. 1=low size/quality, 100=full quality (default)

9. agr.GetRecordSet() now works correctly with Unicode data.

10. New agr.DataSource allows ARC to read data from secondary ODBC datasource as well as the
main Agresso database to which it is connected.

11. Problem with agr.GetTitle() not returning the title in some cases is resolved.

12. New agr.AttachDocument() and agr.AttachFile() to allow the specification of documents or files
to be attached to the distributed email within the vbscript code. This is an alternative to using the
xa_ parameters and is much more versatile.

13. When opening an rpx file with the ARC designer the user will automatically be logged in to a
correspondingly named rec file if one exists and the user was not already logged in or logged in to a
different rec file. When closing the rpx file the user is logged out from the rec file.
14. agr.SetQuery TABLE my_tablename. Allows the user to specify that the report should be run
from the named table which should exist in the externally supplied DataSet. Needed in reports
designed to run from TopGen screens.

15. New agr.SetPaperBin and agr.SetDefaultPaperBin to allow control of which paper bin individual
pages are to be printed to. Use of these methods is very similar to agr.SetCanvas and
agr.SetDefaultCanvas. NB setting the paper bin will not always be respected by the printer / printer
driver in use. I.e. it will only work on some printers.

Excelerator

1. Problem with Page Breaks only being inserted if the total number of page breaks in the report was
an odd number is resolved. (This problem has existed from 8.10 to 8.16).

2. Problem with the combination of query balance, break and nozeros on the same query is
resolved.

3. Problems with breaking on a column name containing a dot in a balance query are resolved. E.g.
break cust.id

4. Trailing blanks are now stripped from string type data read from the database as was the case in
ReportEngine 7.x. This was causing problems when data was compared with values supplied in
code columns or crosstab rows.

5. Very small rounding errors are now ignored by the workbook comparator tool.

6. When using an Excel worksheet as a data source (query EXCEL my_worksheet) the worksheet is
now re-calculated before the read. This is to allow for the case where it was, itself, the result of
loading data from elsewhere or contained referenced to data previously updated by the load
process.

7. It is now possible to refer to a named range to use as a data source. (query EXCEL
my_named_range). This is very useful in order to allow the named range to refer to data that will be
loaded by Excelerator and include extra columns of calculated data.

8. Error handling in the case where data in worksheets used as data source is invalid.

9. GL07 type Post-Back can now be used via the web-service connection.

10. Limit on number of rows returned by a query is removed.

Worderator
1. No Changes
8.16
Changes between 8.15 and 8.16

Report Engine (shared functionality)

1. The treatment of SQL timeouts is corrected (reverts to the same behavior as ReportEngine 7.9 in
conjunction with Agresso 5.4). On the report server no timeout is applied; from the Excel Addin the
timeout set in the Options dialog is respected. Note that this change requires Agresso 553
update2 or Agresso 55sp2 update10, if these updates have not been applied ReportEngine prints a
warning in the log file and continues without setting the timeout.

2. Problem with using the Agresso client type connection to a database which is not the default at
the database/odbc level is resolved.

3. It is now possible to show the log messages in the progress window. (To do this set the value of
this registry entry HKEY_CURRENT_USER\Software\VB and VBA Program Settings\AGRESSO
Excelerator\Options\ShowLogInProgressWindow=1).

4. Cache file editor is improved and supplied as a separate exe file named AgrxlRecEdit.

a. Only the Methods tab is initially open, other tabs open only at the request of the user.

b. A notepad like editor is available to view / edit the contents of cells - useful for working with the
SQL statements.

c. A new randomize feature allows the contents of the selected cells to be randomized - useful for
sensitive data.

5. Problem with the wrong user domain being supplied to the ReportEngine web service when
working with Single-Sign-On is resolved.

6. Problem with upper or mixed case stored procedure names being rejected is resolved (577733).

7. Various registration problems on Vista are resolved.

8. Problem with using the wrong database drivers after certain server processes (including TS01 and
CU04) is resolved. The symptom of this was that if you had a report using native database sql syntax
then it could fail because the sql was being parsed by the Agresso server sql parser.

9. Command line switches to agrxlcmd are no longer case sensitive.

10. Parser type defined in report (rpx or xls) is now respected when the query is run by the report
engine in order to perform report splitting. Previously under some conditions this gave rise to
problems with the Agresso server parser corrupting native flavour SQL.
11. Fixed a major problem with platform login/out with wrong credentials that was leading to the
user being temporarily locked out. It is also improved by getting the correct messages from platform
during authentication.

12. Problem with login failing when logging in to a user with no default client is resolved (this
problem was introduced in 8.14).

13. Cancelled by user errors no longer cause full error details to be displayed on screen when
running from within the Agresso Windows client.

Report Creator

1. Subscript out of range error when copying multiple controls from the report to the canvas in the
ARC Designer is resolved.

2. Last character of subroutine no longer gets lost after commenting out / uncommenting with Cntrl-

3. Problem with rpx file located in the REPORT_WRITER folder not being found if it also requires an
ARW is resolved.

Excelerator

1. Excelerator will now log in silently on demand to a previously used ODBC connectioin but not to a
previously used data cache file.

2. Excel 2003 bug causing file not found error when opening the Excelerator Addin is now detected
automatically and the error message contains a reference to the MS knowledge base article and
details to download the patch to Excel.

Worderator

1. No Changes
8.15
Changes between 8.14 and 8.15

Report Engine (shared functionality)

1. Problem with retrieving email addresses via xe_attid/xe_attvalue or xe_addressid introduced in


8.14 is resolved. (This is the primary reason for this release following shortly after 8.14).

2. Problem with retrieving titles by number when that number was less than 32000 is resolved.

3. Problem with attaching documents from the document archive to emails is resolved. (Problem
was introduced in 8.14).

4. Problem with Database keyword and/or agr.ParserLevel=1 when executing SQL statements not
being respected when ReportEngine was being invoked by certain standard server processes is
resolved.

5. Problem with out of bounds error when using the Extract option from within a pre-browser
balance table enquiry screen is resolved.

6. Data Caching mechanism (.rec files) is improved.

Report Creator

1. New ARC Report from Agresso windows client now leaves the new report (rpx file) open in the
ARC Designer (as per 7.9)

2. The agr.GetDocument() method no longer throws an error if no such document exists in the
document archive. Instead a zero length file image is returned.

Excelerator

1. The Max Rows to load restriction is now ignored for new Excelerator reports.

Worderator

1. No Changes
8.14
Changes between 8.13 and 8.14

Report Engine (shared functionality)

1. Error that occurs when printing a report when an invalid printer tray or paper size is specified is no
longer fatal, a warning is printed in the log file and execution continues.

2. Agresso.ReportEngine.CacheEditor.exe is withdrawn. Cache files may be viewed / edited via


agrxlcmd.exe with the following command: agrxlcmd filename.[rec|xml].

3. ODBC connection is now an option in the Login dialog.

4. Problem with the use of the $ portable sql functions when running against Oracle is resolved.

5. Problem with leading and trailing spaces in parameters is resolved. (Was only a problem where
server process and report parameters with names differing only by leading or trailing spaces).

6. Single sign on is now available when using the Agresso Client type connection from within Excel or
the ARC Designer.

7. Memory usage is reduced and performance increased when running from within Excel or the ARC
designer. (Used to be a problem with inefficient serialization of data)

8. A number of exception handling problems have been resolved.

Report Creator

1. Problem causing rdf files always to be printed to the default printer is resolved. (problem
introduced at 8.10)

2. Problem with progress window remaining visible after previewing a report within the designer is
resolved.

Excelerator

1. Problem with Report (xls) from browser screen generating output like <xr0r0dim2> in columns
where subtotal logic exists is resolved. (HEAT 556230)

2. Problems with printing xls files directly on the report server machine are resolved.
3. Query AGRESSO template_name syntax now works in sheet or group row in _control sheet

4. Sort keyword is now allowed on all query types (except query control). But it is still recommended
to use an SQL ORDER BY clause instead on SQL queries.

5. A new query type of TABLE is available. This means that the query is based on the named table in
the supplied DataSet. (Useful mainly when calling Excelerator programmatically).

6. Support for postback to Salary Review is added.

7. The Validate option when posting back to Planner or Salary Review is now enabled. It processes
the spreadsheet loading data into the postback object but stops before actually posting it. This is
useful as any pre-validation errors will be reported at this stage.

Worderator

1. No Changes
8.13
Changes between 8.12 and 8.13

Report Engine (shared functionality)

1. Problem with sending email attachments on Agresso 533 is resolved (HEAT 544459).

2. Support for multilingual texts is extended.

3. Problem with duplicate parameters differing in case (BatchId vs batchid) is resolved. This problem
occurred in some standard server processes notably su11. (HEAT 545681)

4. Login details (username, client, path etc) are now only remembered after a successful login.

5. Problem with object does not support this property or method error when sending emails is
resolved.

Report Creator

1. No Changes

Excelerator

1. Problem with Exctract (xls) from browser screen which gave rise to columns being offset by one
and incorrectly formatted is resolved. (HEAT 547027)

2. Security on GL07 type post back has been enhanced. The use of this feature is now controlled by
access to the Batch input transactions from external system menu point in the Agresso Windows
client. It is not possible to use this feature at all without this access. Further, unless the user has
access to Batch input Maintenance it is not possible to post to any client other than the client that
the user is logged in as. (HEAT 546237)

Worderator

1. No Changes
8.12
Changes between 8.10 and 8.12

Report Engine (shared functionality)

1. Problem with GetCursor when splitting reports (via xs_breakcol) is resolved.

2. Problem with self registration when running on Visa as an administrator and when running as part
of an Agresso report server process using the Local System user is resolved.

3. Problem with data cache files being overwritten after logging out and logging in again without
closing Excel or the ARC designer is resolved.

4. Added the possibility of attaching files or documents from the document archive to report output
distributed by email. See new parameters xa_file1, xa_doctype1, xa_doctype1, xa_file2,
xa_doctype2, xa_doctype2 etc.

5. CC address is now properly respected xe_cc (previously caused an error with illegal email address
containing !)

6. Error handling and logging has been improved.

7. Problem with 553 authenticator mechanism on web service is resolved.

8. A problem with the web service was discovered when running multiple client sessions from the
same terminal services (or Citrix) server. This has required a change to the web service interface
breaking compatibility with previous versions of the ReportEngine client so that after installing the
new web server it will also be necessary to update all the client installations of ReportEngine that
use it.

Report Creator

1. Problem with automation error when viewing rdf files when logged in as an administrator user on
Vista is resolved.

Excelerator

1. Added support for using planner post-back in asynchronous mode.

2. There is a new option to allow you to remove the Post option leaving only the Validate mode
of postback.
3. Problem with planner posback failing after logging in a second time during the same Excel session
is resolved.

4. Problems encountered when running Excelerator from within Excel on Vista are resolved.

Worderator

1. Resolved problem resulting from a security update in all versions of MS Word which caused a do
you want to run this SQL message when Worderator was run. (This message was spurious anyway
because Worderator was not trying to run any SQL).

8.10
Changes between 7.9 and 8.10

The most important feature of this release is the possibility to log on to Agresso and use the Agresso
client configuration when starting from Excel or the ARC Designer and the availability of functionality
whatever the connection method. For example the Planner Post Back feature is now available when
connected in this way as well as via the web service. If it is possible to run the Agresso Windows
Client from a PC (either locally installed or via central client config) then it is also possible to login to
Agresso from Excel and use Excelerator via the Excel Add-In.

Important:

Due to this increased integration with Agresso this release of ReportEngine to now requires Agresso
55sp2 update 6 or higher. This release of ReportEngine will not function properly against previous
releases of Agresso. To avoid inconvenience to customers who may have a requirement to connect
to both Agresso 55sp2 and an earlier version of Agresso (perhaps for the duration of an upgrade
project) this ReportEngine 8.1 can be installed side-by-side with earlier versions of ReportEngine. (All
GUIDs and ProgIDs have been changed including the installation product ID).

Support for Excel 95 has also been removed.

Report Engine (shared functionality)

1. The data cache file format is changed and the functionality is improved. By default a .rec
(ReportEngine Cache) file is created for all ARC reports when running on the Agresso Report Server.
As before, it is necessary to define a parameter called xc_required with a non-zero, non-blank value
to trigger the same behaviour when running Excelerator on the Report Server. When logging in from
Excel or from the ARC designer it is possible to log in to / connect to a .rec file so that the report can
be re-run offline. It is also possible to create a new cache file when running interactively.

2. A new Data Cache Editor is provided to view and amend .rec files. Also allows these to be
converted to .xml files if required.

3. The security model is improved so that access to the database connection is controlled by access
to the Report Architect menu point whatever the connection method.

4. There should no longer be any reason to connect to an Agresso Database using a direct ODBC
connection. (Although this feature is still available to facilitate use against other databases
especially as a secondary data source in Excelerator)

5. It is now possible to select which type of SQL parsing is required on a report by report basis
wherever the report is being run. I.e. it is no longer necessary to use the Agresso Server Parser
(ASQL) when running on the report server. This is very important as it avoids the, all too frequent,
problem of a report working properly when developed on the client not working properly when
deployed on the Report Server. It is highly recommended that the Client SQL parsing be used even
when running on the Server.

6. Spaces are now tolerated in the value of the xd_indexvals parameter. <client>, <apar_id> with a
space after the comma used to cause an error but now has the desired effect.

7. Resolution of timing information printed in log file is improved.

8. Parameter descriptions rather than parameter names are used when prompting for Browser
template parameters

Report Creator

1. There is a new agr.ParserLevel property available in ARC reports which allows the user to specify
which type of SQL parsing is required. agr.ParserLevel=1 is added by default for all new which
means always use the Agresso client parser. (setting this property to 2 will cause the Agresso
Server SQL parser to be used even when running within the Agresso windows client or directly from
the ARC Designer). Agr.ParserLevel =0 means no parsing, any other value or missing means the
same as Compatibility Mode in Excelerator and mimics the previous functionality.

2. Add defensive code to prevent untrapped trap error when report has zero pages. This situation
arose only when rpt.Cancel was used to cancel the report but had the very undesirable effect of
hanging the Report Server queue. Now, a properly handled error occurs which is reported in the log
file an execution of the server job continues normally.

3. agr.SetQuery "Agresso template_name" is now allowable syntax meaning invoke the


QueryEngine to run the specified browser template and base the report on the results
4. Save As dialog now always opens properly from within the ARC designer. (Used to open the
first time showing only part of the window).

5. Problems printing to printers with names like \\myprinterserver\myprinter are resolved.

6. It is now possible to insert an unbound rich edit control onto the canvas designer.

7. It is now possible to use the Edit Caption feature on the canvas designer.

Excelerator

1. There is a new Pre Parser Level option in the Options window to allow the user to specify
which flavour of SQL parsing they require. Values are None = dont parse the SQL at all, Agresso
Client, Agresso Server or Compatibility Mode which means None when running from within
Excel, Agresso Client when running within the Agresso Client, Agresso Server when running on
the Agresso Report Server i.e. this mimics the previous undesirable behaviour for backwards
compatibility.

2. query excel sheet_name functionality has been extended to read from an Excel List Object if the
sheet_name worksheet contains one.

3. Performance improvements have been made where large amounts of data are loaded into Excel.

4. Problem with Method ~ of object ~ error when inserting large volumes of data into Excel has been
resolved.

5. A column named _exclude can be added into an update_columns row to control whether
individual rows will be included or excluded when the sheet is Posted. Any non-zero, non-blank
value will indicate that the row is to be excluded.

6. Sub-total logic, colours and conditional formatting are now respected when generating a new
Excelerator report from a browser template from within Excel.

7. When prompting for parameters required by a Browser Template the user now sees the
parameter description rather than its name. This normally results in a prompt like Cost Centre
rather then the internal name like dim1.

8. Log in on demand is now applied consistently whatever action is requested.

9. GL07 postback no longer requires separate ODBC connection.

10. Limit of 10000 rows no longer applies to data exported from Agresso.

11. Autofit is no longer used when generating a new report running under Excel 2007 because this
feature of Excel is very slow on Excel 2007.

12. Problem with incorrect treatment of groups when group column contains data with nulls is
resolved.
13. PreParameter rows are now processed after everything else during the unload process so that
the main part of the unload process sees the same view of the worksheet as the load process.

14. Protected worksheets are now re-protected after loading or unloading. Note that on re-
protecting no password is used.

Worderator

2. It is now possible to use Worderator to push data into a mail merge document held outside
Agresso provided that the data column definitions match. It used to be necessary to import the
document into Agresso.

3. Merge fields containing formatting switches are now properly treated.