0% found this document useful (0 votes)
187 views169 pages

2023efront Report User Guide v21 0

Uploaded by

vladimir546
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views169 pages

2023efront Report User Guide v21 0

Uploaded by

vladimir546
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 169

eFront Report User Guide -

V21.0
eFront Report User Guide - V21.0 June 21, 2023

Table of Contents
1. Overview ............................................................................................................. 9
1.1. Concepts .................................................................................................. 10
1.2. eFront - Reporting solutions and eFront Report ...................................... 11
1.3. eFront Report objects .............................................................................. 12
1.4. What is eFront Script? ............................................................................. 13
1.5. Accessing eFront Report ......................................................................... 14
2. Managing eFront Report objects .................................................................... 15
2.1. Create an object ....................................................................................... 16
2.2. Define access rights to an object ............................................................. 17
2.3. Delete an object ....................................................................................... 18
2.4. Duplicate an object .................................................................................. 19
2.5. Execute an object .................................................................................... 20
2.6. Export objects .......................................................................................... 21
2.7. Import objects .......................................................................................... 22
2.8. Customize table join options .................................................................... 25
2.9. Move objects to a different directory ........................................................ 26
2.9.1. Method 1 - drag and drop .............................................................. 26
2.9.2. Method 2 - cut and paste ............................................................... 26
2.9.3. Notes ............................................................................................. 26
3. Building programs and views to get data tables ........................................... 27
3.1. Useful procedures .................................................................................... 28
3.2. Create eFront Script programs ................................................................ 29
3.3. Create views (SQL queries) ..................................................................... 30
3.4. Update program access paths ................................................................. 32
3.5. Update region access paths .................................................................... 33
4. Creating EXCEL and WORD reports ............................................................... 35
4.1. Useful procedures .................................................................................... 36
4.2. Reference information .............................................................................. 37
4.3. Examples ................................................................................................. 38
4.4. Creating and managing EXCEL and WORD reports ............................... 39
4.4.1. Useful procedures .......................................................................... 39
4.4.2. Manage the EXCEL report language ............................................. 39
4.4.3. Create a document ........................................................................ 40
4.4.4. Manage the source data tables ..................................................... 40

Page 2 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.4.4.1. Add source data .................................................................. 40


4.4.4.2. Define properties of data tables ........................................... 41
4.4.5. Manage the report templates ......................................................... 44
4.4.5.1. Useful procedures ............................................................... 44
4.4.5.2. Add an EXCEL template ...................................................... 44
4.4.5.3. Add a WORD template ........................................................ 45
4.4.5.4. Process an EXCEL template ............................................... 45
4.4.5.5. Design the content of WORD templates .............................. 48
4.4.5.6. Define options for document generation .............................. 50
4.4.5.7. Define input parameter and link to data tables .................... 52
4.4.5.8. Include eFront Script programs in a report .......................... 53
4.5. EXCEL macros ........................................................................................ 55
4.5.1. Data display - macros .................................................................... 56
4.5.1.1. EF_G() ................................................................................. 57
4.5.1.2. EF_HTMLTOTEXT() ............................................................ 58
4.5.1.3. EF_IMG() ............................................................................. 59
4.5.1.4. EF_IMPORT() ...................................................................... 59
4.5.1.5. EF_LANG() .......................................................................... 60
4.5.1.6. EF_MACRO() ...................................................................... 61
4.5.1.7. EF_SORT_CELLS() ............................................................ 62
4.5.1.8. EF_T() .................................................................................. 64
4.5.1.9. EF_TC() ............................................................................... 69
4.5.1.10. EF_CHART_LEGEND() ..................................................... 72
4.5.1.11. EF_CHART_PLOTAREA() ................................................. 73
4.5.2. Cell formatting - macros ................................................................. 73
4.5.2.1. EF_AUTOFIT.HEIGHT() ...................................................... 73
4.5.2.2. EF_AUTOFIT.WIDTH() ........................................................ 74
4.5.2.3. EF_MERGE_CELLS() ......................................................... 75
4.5.2.4. EF_SETSHADING.IF() ........................................................ 75
4.5.2.5. EF_V() ................................................................................. 77
4.5.3. Tab management - macros ............................................................ 79
4.5.3.1. EF_SETSHEETNAME() ...................................................... 79
4.5.3.2. EF_S() ................................................................................. 79
4.5.4. Page setup - macros ...................................................................... 80
4.5.4.1. EF_HBREAK() ..................................................................... 80
4.5.4.2. EF_VBREAK() ..................................................................... 81
4.5.4.3. EF_SETCENTERFOOTER() ............................................... 81

Page 3 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.4.4. EF_SETCENTERHEADER() ............................................... 82


4.5.4.5. EF_SETLEFTFOOTER() ..................................................... 82
4.5.4.6. EF_SETLEFTHEADER() ..................................................... 83
4.5.4.7. EF_SETRIGHTFOOTER() ................................................... 84
4.5.4.8. EF_SETRIGHTHEADER() ................................................... 84
4.5.4.9. EF_FITTOPAGES() ............................................................. 85
4.5.4.10. EF_FIRSTPAGENUMBER() .............................................. 85
4.5.5. PDF Generation - macros .............................................................. 86
4.5.5.1. EF_PDFWATERMARK ........................................................ 86
4.6. WORD Mergefield switches and keywords .............................................. 87
4.6.1. Columns ......................................................................................... 87
4.6.1.1. Description ........................................................................... 87
4.6.1.2. Syntax .................................................................................. 88
4.6.1.3. Switches .............................................................................. 88
4.6.2. CHART ........................................................................................... 88
4.6.2.1. Description ........................................................................... 88
4.6.2.2. Syntax .................................................................................. 88
4.6.2.3. Switches .............................................................................. 88
4.6.2.4. Comment ............................................................................. 88
4.6.3. Get ................................................................................................. 89
4.6.3.1. Description ........................................................................... 89
4.6.3.2. Syntax .................................................................................. 89
4.6.3.3. Switches .............................................................................. 89
4.6.3.4. Comment ............................................................................. 89
4.6.4. HYPERLINK .................................................................................. 89
4.6.4.1. Description ........................................................................... 89
4.6.4.2. Syntax .................................................................................. 89
4.6.4.3. Comment ............................................................................. 89
4.6.4.4. Example ............................................................................... 90
4.6.5. IMG ................................................................................................ 90
4.6.5.1. Description ........................................................................... 90
4.6.5.2. Syntax .................................................................................. 90
4.6.5.3. Switches .............................................................................. 90
4.6.6. Loop ............................................................................................... 90
4.6.6.1. Description ........................................................................... 90
4.6.6.2. Syntax .................................................................................. 91
4.6.6.3. Comment ............................................................................. 91

Page 4 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.7. MERGEFIELD switches ................................................................. 91


4.6.7.1. Description ........................................................................... 91
4.6.7.2. Syntax .................................................................................. 91
4.6.7.3. Switches .............................................................................. 91
4.6.7.4. Comment ............................................................................. 93
4.6.7.5. Example ............................................................................... 93
4.6.7.6. Example: Mergefield switch \w ............................................ 94
4.6.8. Conditional MERGEFIELDs ........................................................... 96
4.6.8.1. Description ........................................................................... 96
4.6.8.2. Syntax for a simple {IF} field ................................................ 96
4.6.8.3. Syntax for a nested {IF} structure ........................................ 96
4.6.8.4. Comment ............................................................................. 96
4.6.8.5. Example ............................................................................... 97
4.6.9. Table .............................................................................................. 97
4.6.9.1. Description ........................................................................... 97
4.6.9.2. Syntax .................................................................................. 97
4.6.9.3. Switches .............................................................................. 97
4.6.9.4. Comment ............................................................................. 97
4.6.9.5. Example ............................................................................... 98
4.7. Functions - Operators - Values ................................................................ 99
4.7.1. Functions - numbers ...................................................................... 99
4.7.2. Functions - character strings ....................................................... 102
4.7.3. Functions - dates ......................................................................... 105
4.7.4. Functions - files and folders ......................................................... 114
4.7.5. Functions - special ....................................................................... 117
4.7.6. Operators ..................................................................................... 127
4.7.6.1. Comment ........................................................................... 127
4.7.7. Special values .............................................................................. 128
4.7.8. Specifying values or value ranges ............................................... 128
4.8. Examples - functions and operators ...................................................... 130
4.8.1. DATEADD() - FORMAT() ............................................................. 130
4.8.1.1. Goal ................................................................................... 130
4.8.1.2. Features being illustrated .................................................. 130
4.8.1.3. Program ............................................................................. 131
4.8.2. DATEDIFF() - FORMAT() ............................................................. 131
4.8.2.1. Goal ................................................................................... 131
4.8.2.2. Features being illustrated .................................................. 132

Page 5 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.8.2.3. Program ............................................................................. 132


4.8.3. DATEDIFF() - SEMESTERENDDATE() - 1 .................................. 133
4.8.3.1. Goal ................................................................................... 133
4.8.3.2. Features being illustrated .................................................. 133
4.8.3.3. Program ............................................................................. 133
4.8.4. DATEDIFF() - SEMESTERENDDATE() - 2 .................................. 134
4.8.4.1. Goal ................................................................................... 134
4.8.4.2. Features being illustrated .................................................. 134
4.8.4.3. Program ............................................................................. 134
4.8.5. DATEDIFF() - QuarterBegDate() - DateADD() ............................. 135
4.8.5.1. Goal ................................................................................... 135
4.8.5.2. Features being illustrated .................................................. 135
4.8.5.3. Program ............................................................................. 135
4.8.5.4. Comments ......................................................................... 137
4.8.6. DMY() - MDY() - FORMAT() ........................................................ 137
4.8.6.1. Goal ................................................................................... 137
4.8.6.2. Features being illustrated .................................................. 137
4.8.6.3. Program ............................................................................. 137
4.8.7. FILENAME() - FILE() ................................................................... 138
4.8.7.1. Goal ................................................................................... 138
4.8.7.2. Features being illustrated .................................................. 138
4.8.7.3. Program ............................................................................. 138
4.8.7.4. Comment ........................................................................... 139
4.8.8. GETTEMPPATH() ........................................................................ 140
4.8.8.1. Goal ................................................................................... 140
4.8.8.2. Features being illustrated .................................................. 140
4.8.8.3. Program ............................................................................. 140
4.8.8.4. Comment ........................................................................... 141
4.8.9. GETUSERID()_GETUSERINFO() ............................................... 141
4.8.9.1. Goal ................................................................................... 141
4.8.9.2. Features being illustrated .................................................. 141
4.8.9.3. Program ............................................................................. 141
4.8.9.4. Available fields ................................................................... 142
4.8.9.5. Comment ........................................................................... 142
4.8.10. LOOKUP()_LOOKUPCODE() .................................................... 142
4.8.10.1. Goal ................................................................................. 142
4.8.10.2. Features being illustrated ................................................ 143

Page 6 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.8.10.3. Prerequisite ..................................................................... 143


4.8.10.4. Program ........................................................................... 143
4.8.10.5. Result .............................................................................. 144
4.8.11. PROC SORT - (WHERE - NOT...IN) .......................................... 144
4.8.11.1. Goal ................................................................................. 144
4.8.11.2. Features being illustrated ................................................. 144
4.8.11.3. Program ........................................................................... 144
4.8.12. ROUND()_CINT() ....................................................................... 144
4.8.12.1. Goal ................................................................................. 144
4.8.12.2. Features being illustrated ................................................ 144
4.8.12.3. Program ........................................................................... 144
4.8.13. WEEKDAY() ............................................................................... 146
4.8.13.1. Goal ................................................................................. 146
4.8.13.2. Features being illustrated ................................................ 146
4.8.13.3. Comment ......................................................................... 146
4.8.13.4. Program ........................................................................... 146
4.8.14. YMD() ......................................................................................... 147
4.8.14.1. Goal ................................................................................. 147
4.8.14.2. Features being illustrated ................................................ 147
4.8.14.3. Program ........................................................................... 147
4.8.15. YMD() - FORMAT() .................................................................... 148
4.8.15.1. Goal ................................................................................. 148
4.8.15.2. Features being illustrated ................................................ 148
4.8.15.3. Program ........................................................................... 148
4.9. Data entry forms, and reference information ......................................... 150
4.9.1. Parameter Informats .................................................................... 150
4.9.2. The Filters Form ........................................................................... 155
4.9.3. The Group By Form ..................................................................... 156
4.9.4. The Listing Form .......................................................................... 157
4.9.5. The Parameters Form .................................................................. 158
4.9.6. The Report Settings Form ........................................................... 159
4.9.7. The SQL Query Form .................................................................. 159
5. Launching & updating reports ...................................................................... 161
5.1. Useful procedures .................................................................................. 162
5.2. Launch a report from desktop widget ..................................................... 163
5.3. Launch a report from within eFront Report ............................................ 164
5.4. Schedule report execution ..................................................................... 165

Page 7 of 169
eFront Report User Guide - V21.0 June 21, 2023

5.5. Launch a report using eFront CMD ........................................................ 167


6. Configuring the eFront Report Package ...................................................... 168
6.1. PCKAJXREPORT - parameters (company level) .................................. 169
6.1.1. PCKAJXREPORT (FrontReport) ................................................. 169

Page 8 of 169
eFront Report User Guide - V21.0 June 21, 2023

1. Overview

Page 9 of 169
eFront Report User Guide - V21.0 June 21, 2023

1.1. Concepts

Page 10 of 169
eFront Report User Guide - V21.0 June 21, 2023

1.2. eFront - Reporting solutions and eFront Report

eFront provides a set of decision-making and reporting solutions specifically designed


for financial businesses. The entire entire reporting chain is automated: from your
external databases, EXCEL files, or existing eFront databases, through to final
production in the form of reports in different formats (WORD, EXCEL, PDF, HTML).

eFront Report offers the Banking, Insurance and Private Equity sectors the opportunity
to improve the production process of reports aimed at stakeholders (investors,
regulators, customers, etc.), particularly by:

• enabling massive productivity gains in reporting tasks,


• accelerating the update frequency,
• enriching the details of information being transmitted,
• providing increased reliability of reported information.

eFront Report achieves report production efficiency and quality through the following
work principles:

• Reduce time spent on data extraction from external databases or eFront databases:
apply asynchronous batch processing (i.e. at night).
• Optimize and reduce time spent on data processing.
• Guarantee data freshness.
• Guarantee data security: define data visibility based on user access rights and data
regions.
• Reduce time spent on exchanges between client and server: create and edit WORD
and EXCEL reports using the eFront Report server-based editing tools instead of
client-based applications.
• Increase the quality of WORD and EXCEL reports: access optimized VBA and
EXCEL libraries using the eFront Report server-based report editing tools.
• Reduce the complexity of report authoring: use the drag & drop based user
interface. No need to dig into data extraction programs, SQL queries, data processing,
programming formulas or complex spreadsheet operations.
• Achieve maximum ability to customize data extraction, data processing and report
generation: use eFront Script, the eFront Report programming language.

Page 11 of 169
eFront Report User Guide - V21.0 June 21, 2023

1.3. eFront Report objects

eFront Report handles the following objects:

Object Description
Program Set of eFront Script instructions, which creates and processes data tables.
View Virtual or logical table resulting of a pre-compiled SQL query; data query is executes from
the database in real time
Document Logical object, which integrates data tables and EXCEL / WORD templates. When
executing a document, the system generates EXCEL / WORD files based on the EXCEL /
WORD templates linked to the document, and instantiated to the data taken from the data
tables linked to the document
Report Organized and formatted collection of data fed by the data tables, prepared for viewing or
printing.
Stylesheet List of styles which can be applied to the different elements in a report
Query Builder An interactive eFront Invest database query tool. It provides a drag-and-drop functionality
for creating queries from eFront Invest database objects, such as contacts, companies
and funds.
Table Set of columns and rows that hosts application data. The number of columns is fixed, the
number of rows depends on the data volume.

Tables are generated by programs.


Dashboard Small, defined set of key metrics used to provide a quick data evaluation.
FrontExcel An Excel report designed using the FrontExcel Add-In.
Report
Cube A collection of data based on extracted or calculated data from Excel, SQL databases, the
calculation engine, analytics libraries and the query builder.

Page 12 of 169
eFront Report User Guide - V21.0 June 21, 2023

1.4. What is eFront Script?

eFront Script is the eFront programming language used to write data process
programs. Data process programs have two main objectives:

• Extract data from databases (ex.: eFront Invest Classic, eFront Invest, external
databases), and build eFront Report data tables or eFront Analytics data cubes.
• Process data tables to calculate statistics, and produce tabular reports, listings, charts,
dashboards, WORD and EXCEL documents.

eFront Script is a database-oriented fourth-generation programming language (4GL)


developed for data manipulation, data analysis and reporting.

eFront Script is a procedural programming language. Each eFront Script program is


composed of DATA steps that build the data tables, and a series of procedure steps that
process the data tables and generate reports.

The DATA step section of an eFront Script program assumes a default file structure,
and automates the process of identifying files to the operating system, opening the input
file, reading the next record, opening the output file, writing the next record, and closing
the files. Most of the time the DATA step works within an implicit program loop that runs
for each record.

All other tasks are accomplished by procedures that operate on the table as a whole.
Typical tasks include printing or performing statistical analysis, and may just require the
user or programmer to identify the data set. Procedures are not restricted to only one
behavior and thus allow extensive customization, which is controlled by statements and
options defined within the procedures.

eFront Script offers macro programming extensions, which can be used to generate
eFront Script code. Macro code in an eFront Script program undergoes pre-
processing.

At runtime, procedure steps are compiled, interpreted and run in the sequence they
appear in the eFront Script program. An eFront Script program requires the eFront
Report environment to run.

Page 13 of 169
eFront Report User Guide - V21.0 June 21, 2023

1.5. Accessing eFront Report

1. Open your eFront Invest application.


2. From the main menu, click Open > Reports.
The Reports window opens.
3. Click on a folder in the Directories section on the page sidebar.
Report objects display.

Page 14 of 169
eFront Report User Guide - V21.0 June 21, 2023

2. Managing eFront Report objects

Useful Procedures

Create an object

Define access rights to an object

Delete an object

Duplicate an object

Execute an object

Export objects

Import objects

Customize table join objects

Move objects to a different directory

Page 15 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.1. Create an object

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Click New object.
The object editor opens.
3. Under Name, enter a value.
4. Under Type, select an object type.
Get details about the types...
eFront Report handles the following objects:

Object Description
Program Set of eFront Script instructions, which creates and processes data tables.
View Virtual or logical table resulting of a pre-compiled SQL query; data query is executes
from the database in real time
Document Logical object, which integrates data tables and EXCEL / WORD templates. When
executing a document, the system generates EXCEL / WORD files based on the
EXCEL / WORD templates linked to the document, and instantiated to the data
taken from the data tables linked to the document
Report Organized and formatted collection of data fed by the data tables, prepared for
viewing or printing.
Stylesheet List of styles which can be applied to the different elements in a report
Query Builder An interactive eFront Invest database query tool. It provides a drag-and-drop
functionality for creating queries from eFront Invest database objects, such as
contacts, companies and funds.
Table Set of columns and rows that hosts application data. The number of columns is
fixed, the number of rows depends on the data volume.

Tables are generated by programs.


Dashboard Small, defined set of key metrics used to provide a quick data evaluation.
FrontExcel An Excel report designed using the FrontExcel Add-In.
Report
Cube A collection of data based on extracted or calculated data from Excel, SQL
databases, the calculation engine, analytics libraries and the query builder.
5. Click OK.
The application creates the object in the database, and it displays in the objects'
folder.
6. Double-click the created object to access its details.

Page 16 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.2. Define access rights to an object

You can limit access to eFront Report objects.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Right-click an eFront Report object.
3. Click Properties.
The object properties manager displays.
4. Click on the chevron next to Object's properties and select Access Rights.
The Default access rights and Specific access rights sections display.
5. Access the Default access rights section.
6. Check/define default access rights.
The Default access rights are Execute, Read, Modify, and Delete.
7. Define access rights per user / user group:
a. Right-click anywhere in the Specific access rights section and select Add
User.
The user/user group selector opens.
b. Select user(s) / user group(s).
c. Click OK.
The selected user displays.
d. Define rights per user.
8. Click Save.

Page 17 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.3. Delete an object

1. Open the directory that contains the object(s) to delete.


2. Select one or more objects.
3. Right-click the selection.
The contextual menu displays.
4. Click Delete.
A confirmation request displays.
5. Click OK.

Page 18 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.4. Duplicate an object

1. Open the directory that contains the object to duplicate.


2. Select one or more objects.
3. Right-click the selection.
The contextual menu displays.
4. Click Duplicate.
The object renaming box displays.
5. Enter a new object name.
6. Click OK.

Page 19 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.5. Execute an object

You can execute programs without opening them.

1. Open the directory that contains the program to execute.


2. Right-click a program.
The contextual menu displays.
3. Click Execute.
Note that you cannot execute View, Cube, and FrontExcel objects.

Page 20 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.6. Export objects

You can export objects to transfer them into another eFront Report database. Objects
are transferrable as .ZIP files that are produced when exporting objects.

1. Open the directory that contains the object(s) to export.


2. Select one or more objects.
3. Right-click the selection.
The contextual menu displays.
4. Click Export selection.
The file is exported.

Page 21 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.7. Import objects

You can import objects from another eFront Report database. Objects are transferable
as .ZIP files that are produced when exporting objects from an eFront Report database.

When recompiling views during the import, the options related to the tables' join are by
default the options defined in eFront Admin. However, you can customize the table join
options.

Get details about how to customize table join options...

When recompiling views during the import, the options related to the tables' join are by
default the options defined in eFront Admin (feature: DisableAnsiJoins). This feature is
enabled for SQL servers. But you can customize the table join options from within the
eFront Report environment.

1. Double-click a view.
2. Click View Properties.
3. Under Force join mode, select an option.
Default: apply default settings defined in eFront Admin.
ANSI: apply SQL data base table join.
4. Click Save & Close.

1. Open the directory where you want to store the imported eFront Report object.
2. Right-click anywhere within the reports table.
The contextual menu displays.
3. Click Import here.
The file upload manager displays.
4. Select the files to upload and click Open.

If objects have the same name as imported objects, the imported objects
replace automatically the already existing objects.
5. If you import a program, update program access paths.
To allow eFront Report objects to easily access included programs, include
program access paths in the database system options.
a. From the main application menu, click Administration >Guide.

Page 22 of 169
eFront Report User Guide - V21.0 June 21, 2023

b. From the Guide's themes, select FrontReport.


c. Click Explorer.
d. In the Administration section, click System options.
e. Click the Magnifier icon at the right of the Search paths field.
The eFront Report directories' tree displays.
f. Select the directory that contains programs.
g. Click OK.
From now on, when you include a program that is contained in the directory
specified into an eFront Report object, you don't have to specify the access
paths.
Instead of writing: &INCLUDE "\\MDUVINAGE(Private]
\Programs\Test_program";
you only need to write: &INCLUDE "Test_program";
6. If you use region variables, update region access paths.
To manage data access and visibility, directories are assigned to regions. eFront
Report handles a collection of standard regions:
• SYSTEM: refers to a region, also called region 0, that is visible to all accounts
installed on the same server. Only users with the profil Remote Admin can
modify data of this region (Write access). All other users have Read only access.
• SHARED: refers to the shared region, a folder that contains standard programs
and standard tables shared by all users.
• PRIVATE: refers to the private region, a folder that contains data owned by the
current user.
• PUBLIC: refers to the public region, a folder that contains data shared by all
users.
• INFO: refers to the Information region.
• ROOT: refers to the region where the eFront Script program is located.
Programs can reference these regions using magic variables:
\\{SYSTEM}
\\{SHARED}
\\{PRIVATE}
\\{PUBLIC}
\\{ROOT}
\\{INFO}

Page 23 of 169
eFront Report User Guide - V21.0 June 21, 2023

It is possible to instantiate the magic variables with a path specified in the eFront
ReportAdministration section:
a. From the main application menu, click Administration >Guide.
b. From the Guide's themes, select eFront Report.
c. Click Explorer.
d. In the Administration section, click System options.
e. Click the Magnifier icon at the right of the Search paths field.
The eFront Report directories' tree displays.
f. Select a directory that corresponds to the first of the 4 standard regions.
g. Click OK.
h. Repeat step 3 to 5 for each of the standard regions.
From now on, when you include a program that uses a magic variable, eFront
Report automatically instantiates the variable with the path being defined in the
system option.

Page 24 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.8. Customize table join options

When recompiling views during the import, the options related to the tables' join are by
default the options defined in eFront Admin (feature: DisableAnsiJoins). This feature is
enabled for SQL servers. You can customize the table join options from within the eFront
Report environment.

1. Double-click a view.
2. Click View Properties.
3. Under Force join mode, select an option.
Default: apply default settings defined in eFront Admin.
ANSI: apply SQL data base table join.
4. Click Save & Close.

Page 25 of 169
eFront Report User Guide - V21.0 June 21, 2023

2.9. Move objects to a different directory

2.9.1. Method 1 - drag and drop


1. Open the eFront Report directory that contains the object(s) to move.
2. Select the objects.
3. Drag & drop the objects into the target folder.

2.9.2. Method 2 - cut and paste


1. Open the eFront Report directory that contains the object(s) to move.
2. Select the objects.
3. Right-click on the selection and click Cut.
4. Right-click on the destination directory and click Paste.
You can also open the destination directory, right-click on the objects window, and
click Paste.

2.9.3. Notes
You can also copy and paste objects between directories in the same environment.

Page 26 of 169
eFront Report User Guide - V21.0 June 21, 2023

3. Building programs and views to get data tables

Page 27 of 169
eFront Report User Guide - V21.0 June 21, 2023

3.1. Useful procedures

Create eFront Script programs

Create view (SQL queries)

Update program access paths

Update region access paths

Page 28 of 169
eFront Report User Guide - V21.0 June 21, 2023

3.2. Create eFront Script programs

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Navigate to the target folder.
3. Click New object.
The object editor opens.
4. Under Name, enter a value.
5. Under Type, select Program.
6. Click OK.
7. Double-click the created program to access its details.
The program editor opens.
8. In the program editor, enter an eFront Script program...
eFront Report programs are written using eFront Script, the eFront Report
programming language. For details, refer to the eFront Script Reference Guide.

NOTE
Note that you can disable automatic indentation by right-clicking in
the program editor and selecting Disable auto-indent. Indentation is
enabled by default.

9. Click Save.
10. Click Compile.

IMPORTANT
Skip this step if you have unselected the FrontCube
programcheckbox in Properties.

Compiler messages display in the log section.


11. Click Execute.
The system runs the program and builds the eFront Report data table.

Page 29 of 169
eFront Report User Guide - V21.0 June 21, 2023

3.3. Create views (SQL queries)

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Navigate to the target folder.
3. Click New object.
The object editor opens.
4. Under Name, enter a value.
5. Under Type, select View.
6. Click OK.
7. Double-click the view to access its details.
The view editor opens.
8. Select the main table:
a. Right-click anywhere in the Table section.
The contextual menu displays.
b. Click Select Main table.
The table manager opens.
c. Under the Package drop-down list, choose a package.
d. Select a table.
e. Click OK.
9. (optional) Add secondary tables:
a. Right-click the main table.
b. Click Add secondary table.
The list of secondary tables that are accessible from the main table, displays.
c. Select one or more tables.
The selected secondary tables are added.
10. (optional) To de-activate the user region filter that applies to the searched tables:
a. Click View Properties.
b. Under No region filter, select Yes.
Keep the region filter! If you don't use it, you might bypass user rights.
eFront cannot be held responsible for any consequences that might occur.
11. Select the columns to include in the query:
a. Select a data table.

Page 30 of 169
eFront Report User Guide - V21.0 June 21, 2023

b. In the side panel, click Columns.


All the columns of the data table display.
c. Drag and drop columns into the Column section.
The first column must reference the main table's lQld.
d. Click Save.
12. Define column properties:
a. In the side panel, click Column properties.
b. Select a column from the column section.
c. Enter the data.
If you use an expression in a query, eFront Report assumes that the result
by default is a string. If it is not, you must override the Type, and select the
appropriate data type.
13. (Optional) Define dynamic criteria
You can include dynamic criteria in your SQL query. To do so, define a parameter,
and then point to it from within the query or the expression (%<parameter>).
However, queries cannot use the parameter definition directly. You must include
this type of query in a program or a report that re(defines) the parameters.
a. Right-click a column in the column section.
The contextual menu displays.
b. Click Add parameter.
The system appends a new line in the Parameters section.
c. Enter the required information.
For details, refer to the Parameters form description.
14. Click Check.
The system builds the SQL query, which displays in the Log section.
15. View the resulting data table:
• In Pages, click Overview.
The data table built by the view is displayed.
16. Click Save & Close.

Page 31 of 169
eFront Report User Guide - V21.0 June 21, 2023

3.4. Update program access paths

To allow eFront Report objects to easily access included programs, include program
access paths in the database system options.

1. From the main application menu, click Administration >Guide.


2. From the Guide's themes, select FrontReport.
3. Click Explorer.
4. In the Administration section, click System options.
5. Click the Magnifier icon at the right of the Search paths field.
The eFront Report directories' tree displays.
6. Select the directory that contains programs.
7. Click OK.
From now on, when you include a program that is contained in the directory
specified into an eFront Report object, you don't have to specify the access paths.
Instead of writing: &INCLUDE "\\MDUVINAGE(Private]\Programs\Test_program";
you only need to write: &INCLUDE "Test_program";

Page 32 of 169
eFront Report User Guide - V21.0 June 21, 2023

3.5. Update region access paths

To manage data access and visibility, directories are assigned to regions. eFront
Report handles a collection of standard regions:

• SYSTEM: refers to a region, also called region 0, that is visible to all accounts
installed on the same server. Only users with the profil Remote Admin can modify
data of this region (Write access). All other users have Read only access.
• SHARED: refers to the shared region, a folder that contains standard programs and
standard tables shared by all users.

• PRIVATE: refers to the private region, a folder that contains data owned by the current
user.
• PUBLIC: refers to the public region, a folder that contains data shared by all users.
• INFO: refers to the Information region.
• ROOT: refers to the region where the eFront Script program is located.

Programs can reference these regions using magic variables:

\\{SYSTEM}

\\{SHARED}

\\{PRIVATE}

\\{PUBLIC}

\\{ROOT}

\\{INFO}

It is possible to instantiate the magic variables with a path specified in the eFront
ReportAdministration section:

1. From the main application menu, click Administration >Guide.


2. From the Guide's themes, select eFront Report.
3. Click Explorer.
4. In the Administration section, click System options.

Page 33 of 169
eFront Report User Guide - V21.0 June 21, 2023

5. Click the Magnifier icon at the right of the Search paths field.
The eFront Report directories' tree displays.
6. Select a directory that corresponds to the first of the 4 standard regions.
7. Click OK.
8. Repeat step 3 to 5 for each of the standard regions.
From now on, when you include a program that uses a magic variable, eFront
Report automatically instantiates the variable with the path being defined in the
system option.

Page 34 of 169
eFront Report User Guide - V21.0 June 21, 2023

4. Creating EXCEL and WORD reports

Page 35 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.1. Useful procedures

• Creating and managing EXCEL and WORD reports

Page 36 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.2. Reference information

• EXCEL macros
• WORD Mergefield switches and keywords
• Functions - Operators - Values

Page 37 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.3. Examples

• Examples - function and operators

Page 38 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.4. Creating and managing EXCEL and WORD reports

4.4.1. Useful procedures


1. Manage the EXCEL report language
2. Create a document
3. Add source data
4. Define properties of data tables
5. Manage the report templates

4.4.2. Manage the EXCEL report language


When you build an EXCEL report, and the Office language on your machine is set to
English, you need to specify the Office language from within the database in order to
avoid date and number formatting errors, when generating standard EXCEL reports.
Note that the Office language is specified per user.

This option provides two enhancements:

• If you select English, when you drag&drop macros in the EXCEL designer (EF_T,
EF_G and EF_S), ';' is replaced by ',' in the cells. But be aware, that the separator
used by EXCEL in number formatting is the one defined in the regional WINDOWS
settings.
• Date formatting in standard reports depends on the selected language.

1. From the main application menu, click Administration > Users.


2. The Search a user page displays the list of existing users.
3. Open a user.
The General page of the user displays.
4. Under Pages, click Options.
The Options page opens.
5. In PCKAJXREPORT (eFrontReport), select a language from the Office language
drop-down list.
The available languages are English, Dutch, French, German, and Italian.
6. Click Save.
Reload the application.

Page 39 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.4.3. Create a document


1. From the main menu, click Open > Reports.
The Reports window opens.
2. Navigate to the target folder.
3. Click New object.
The object editor opens.
4. Under Name, enter a value.
Avoid blank spaces in the name!
5. Under Type, select Document.
6. Click Save & Close.
7. Double-click the created document to access its details.
The table editor displays.
8. You are now ready to manage the source data for the current document.

4.4.4. Manage the source data tables


When you build an EXCEL template or a WORD template, you need to link the
document to the data tables, from which you can then choose the data be be used.
You need first to add the source data tables, and then process these tables:

• Add source data tables


• Define properties of data tables

4.4.4.1. Add source data


Before you can generate WORD or EXCEL reports, you need to define the source data
table(s) to be used together with the document.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
3. Access the Tables section.
4. Click Add.
The list of available sources displays.
5. In the Add Source window, select the eFront Report object whose data you want to
include in the document.

Page 40 of 169
eFront Report User Guide - V21.0 June 21, 2023

Note that it is not possible to add libraries that use parameters.


You can add cubes and FrontCube libraries only if you have selected the
FrontCube program checkbox in Properties on the side panel.
You can only select one document at a time. Repeat the process if you need to add
multiple documents.
The object(s) is(are) now linked to the document and display in the Tables section.
6. Click Save.
The application generates automatically the corresponding eFront Script source
code.
7. View the automatically generated source code:
• Under Pages, click Source.
8. Define properties of data tables.

4.4.4.2. Define properties of data tables


Prerequisite:

• You have linked at least one data table to the document to be processed.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
3. In the Tables section, select a data table.
4. Click Modify.
The properties editor of the data table opens.
5. To process the data table, do any of the following:
a. (Optional) Rename the table under Renamed as.
Rename a table to clearly identify the content of the processed table.
b. (Optional) Define the runtime pathname under Pathname (runtime).
A report is likely to be run by different users with different data access rights.
To make the same report executable by various user groups, without having to
change the data tables attached to the document, define a runtime pathname:
at runtime eFront Report is searching the data table in the folder being
specified by the runtime pathname. Of course, the table must exist in the folder
being specified. Therefore you have to include a program that creates the
data table in the runtime folder, before executing the report. Here is a runtime

Page 41 of 169
eFront Report User Guide - V21.0 June 21, 2023

pathname example: \\{PRIVATE}}\TABLES. For details about the definition of


access paths, see: Update region access paths.
c. (Optional) To filter column content, and Add a filter in the Filters section.
The Filters option allows you to filter column values by applying a condition,
and sort the values.
For details, see: The Filters Form.

Column Description
Encloses the expression within parenthesis

Name Identifies the column to be filtered. Tick the Display Name box at the bottom of
the Filters' section to display column names, and untick the Display Name box to
display column labels.
Order Defines the sort option (Ascending or Descending), that applies to the column
being selected.
Operator Defines the operator to be included in the data filter expression. Possible
operators are:

<>

<

>

>=

<=

IS NULL

IS NOT NULL

LIKE

NOT LIKE

IN

NOT IN

MOD

BETWEEN(,)

NOT BETWEEN(,)

Page 42 of 169
eFront Report User Guide - V21.0 June 21, 2023

Criteria Defines the parameter needed to use the operator


Encloses the expression within parenthesis

Log. operator Identifies the logical operator to be used when combining several filters

d. (Optional) Group columns, and Add a group in the Group by section.


If the Group By option is not used, all the columns of the data table are
available to the report template. If you define the Group By option, you
create a sub-table from the input table, and only the columns included in the
sub-table are available to the report template. You can also define calculations
to be carried out on the columns, apply a format, define a label, or filter the
column according to user input.
For details, see: The Group By Form.

Column Description
Group by Identifies the column for which to calculate statistics
Name Identifies the column
Renamed as Defines a new column name
Total Selects a function [N, Total(), Average(), MAX(), MIN(), IRR(), Multiple()] that can
be applied to column values. When you use the IRR() function, you have to
select a DATE type column from the Parameter drop-down list. For details about
how to use these functions, refer to the eFront Script Reference Guide.
Parameter The Parameter drop-down list presents all the table columns whose type =
DATE. You have to select a column from the Parameter drop-down list, when
applying the IRR() function to a column.
Label Defines the column title to display in a report
Format Identifies the format to be applied to resulting values. For details about formats,
refer to the eFront Script Reference Guide.
6. Click OK.
7. Click Save.
The application generates automatically the corresponding eFront Script source
code.
8. (Optional) To view the automatically generated source code, under Pages, click
Source.
The source code displays.

Page 43 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.4.5. Manage the report templates

4.4.5.1. Useful procedures


• Add an EXCEL template
• Add a WORD template
• Design content of EXCEL template
• Design content of WORD template
• Define options for document generation
• Schedule report execution
• Define input parameter and link to data tables

4.4.5.2. Add an EXCEL template


To create an EXCEL workbook, or a simple EXCEL sheet, you need to add an EXCEL
template to an eFront Report document. You can attach as many EXCEL templates
as desired to one single document. You can either link an already existing EXCEL
template to the document, or create a new one.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
The document editor opens.
3. In the Templates section:
a. To create a new template, click New XLS or New XLSX.
The new document is created.
b. To upload an existing Excel file, click Browse... and upload the file.
The file displays in the Templates window.
4. (Optional) To download the template:
a. Click Pages > Templates.
The Templates page opens.
b. In the side panel, expand the Templates section.
All templates uploaded previously display.
c. Select a template and click Download in the 2. Download the Template
section.
The Excel file is downloaded.

Page 44 of 169
eFront Report User Guide - V21.0 June 21, 2023

5. Click Save.
6. (Optional) To view the automatically generated source code, open the Source tab.

4.4.5.3. Add a WORD template


To create a WORD document, you need to add a WORD template to an eFront
Report document. You can attach as many WORD templates as desired to one single
document. You can either link an existing WORD template to the document, or create a
new one.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
The document editor opens.
3. In the Templates section:
a. To create a new template, click New DOC.
New Document.DOC is created.
b. To upload an existing Word file, click Browse... and upload the file.
The file displays in the Templates window.
4. (Optional) To download the template:
a. Click Pages > Templates.
The Templates page opens.
b. In the side panel, expand the Templates section.
All templates uploaded previously display.
c. Select a template and click Download in the 2. Download the Template
section.
The DOC file is downloaded.
5. Click Save.
When saving the document after having added a template, he application
automatically generates the corresponding eFront Script source code.
6. (Optional) To view the automatically generated source code, open the Source tab.

4.4.5.4. Process an EXCEL template


Prerequisite:

• You have linked at least one EXCEL template to the eFront Report document.

Page 45 of 169
eFront Report User Guide - V21.0 June 21, 2023

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
3. Under Pages, click Templates.
The Templates page opens.
4. In the side panel, expand the Templates section.
The available templates display.
5. Select a template and click Download in the 2. Download the template section.
The selected template is downloaded.
6. Open the downloaded template.
7. To access the data to include in the template, expand the Fields section in the side
panel.
All the available data fields display.
if the data fields do not display, click Save again.
8. To build your report:
a. Use the EXCEL macros.
b. Drag and drop data fields into the document.
The system creates automatically the corresponding EXCEL macro.
The drag and drop functionality only works in Internet Explorer.
The Table tool: generates an EF_T() macro.
The Entry tool: generates an EF_G() macro.
The Sheet tool: generates an EF_S() macro.
For details, refer to the chapter EXCEL macros
When generating an .XLS file from an eFront Report document, you activate
a merge process, i.e.: source data taken from the eFront Report data
warehouse are merged into the .XLS file. You control the merge process
through the use of EXCEL macros. To allow EXCEL macros to execute
correctly, you must:
• Define the region where values display using the EF_T() or EF_TC() macro.
• Place the EXCEL macros above or at the left of the region of values.
• Macros are executed from left to right, and from top to bottom.
• There is no processing on the client, all processing is done on the server.
Here is an overview of available EXCEL macros (demos are available in the
document FrontReport - EXCEL macros - Tutorials):

Page 46 of 169
eFront Report User Guide - V21.0 June 21, 2023

Category Purpose Macro


Data display Extract an unique source data value. EF_G()
Strips HTML tags from HTML-rich text, , EF_HTMLTOTEXT()
and renders the text without the tags.
Insert an image in the EXCEL EF_IMG()
spreadsheet.
Import a data region from an EXCEL file EF_IMPORT()
Develop multilingual reports. According to EF_LANG()
the language being chosen, EF_LANG()
picks the appropriate language token.
Retrieve macro variable content. Macro EF_MACRO()
variables are defined using %LET and
%PARAM statements.
Sorts a region of cells in the EXCEL EF_SORT_CELLS()
spreadsheet.
Display data in a table (by rows). Specify EF_T()
the region where values display. The
region expands vertically if new values
are added.
Display data in a table (by columns). EF_TC()
Specify the region where values display.
The region expands horizontally if new
values are added.

Cell formatting Define the cell's background color, EF_SETSHADING.IF()


background pattern, and text color
according to a condition.
Resizes the cell height (be careful when EF_AUTOFIT.HEIGHT()
using EF_AUTOFIT())
Resizes the cell width (be careful when EF_AUTOFIT.WIDTH()
using EF_AUTOFIT())
Merges automatically the cells of a range EF_MERGE_CELLS
Format source data (values). EF_V()
Tab Manage the automatic translation of EF_SETSHEETNAME()
management sheet names according to the language
being chosen.
Split a workbook into multiple sheets, EF_S()
and creates one sheet per value of the
column being chosen.
Page setup Insert a horizontal page break in the EF_HBREAK()
sheet
Insert a vertical page break in the sheet EF_VBREAK()

Page 47 of 169
eFront Report User Guide - V21.0 June 21, 2023

Insert a footer at the bottom center of EF_SETCENTERFOOTER()


each report page.
Insert a header at the top center of each EF_SETCENTERHEADER()
report page.
Insert a footer at the bottom left of each EF_SETLEFTFOOTER()
report page.
Insert a header at the top left of each EF_SETLEFTHEADER()
report page.
Insert a footer at the bottom right of each EF_SETRIGHTFOOTER()
report page.
Insert a header at the top right of each EF_SETRIGHTHEADER()
report page.

Save your work regularly in case of a loss of connection.


9. Click Save.
10. To run your report, click Compile then Execute.
If you have unselected the FrontCube program checkbox in Properties, you only
need to click Execute.
The system executes all the templates linked to the current document, and makes
all the templates available for download.
All the executed reports are stored in the Attachments section of the document.
11. (Optional) To view the automatically generated source code, open the Source tab.

4.4.5.5. Design the content of WORD templates


Prerequisite:

• You have linked at least one WORD template to the eFront Report document.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
3. Under Pages, click Templates.
The Templates page opens.
4. In the side panel, expand the Templates section.
The available templates display.
5. Select a template and click Download in the 2. Download the template section.
The selected template is downloaded.

Page 48 of 169
eFront Report User Guide - V21.0 June 21, 2023

6. Open the downloaded template.


7. To access the data to include in the template, expand the Fields section in the side
panel.
All the available data fields display.

If the data fields do not display, click Save again.


8. To build your report:
a. Use the WORD Mergefield switches and keywords.

To display MERGEFIELD codes, press ALT + F9 when in Microsoft Word.


b. Drag and drop data fields into the document.
The system creates automatically the corresponding merge field code.
The Loop tool: generates a Loop keyword.
The Entry tool: generates a Get keyword.
The Table tool: generates a Table keyword.
For details, refer to the chapter WORD Mergefield switches and keywords
When generating a .DOC file from an eFront Report document, you activate
a merge process, i.e.: source data taken from the eFront Report data
warehouse are merged into the .DOC file. You control the merge process
through the merge fields, and their customization. Mergefields show in
your .DOC file when you drag and drop table data into the document. You
can control mergefields using conditional MERGEFIELDs.
Here is an overview on available WORD mergefield switches and keywords:

Purpose WORD mergefield keyword / switch


Columns
Insert an EXCEL chart CHART
Extract a unique column value Get
Include a link HYPERLINK
Insert an image IMG
Define the information to be repeated for each table entry Loop
Apply a condition to source data MERGEFIELD switches - \w
Define the background color of a column MERGEFIELD switches - \s
Format currencies, numbers, and telephone numbers MERGEFIELD switches - #
Format data and time MERGEFIELD switches - @
Hide column values MERGEFIELD switches - \e

Page 49 of 169
eFront Report User Guide - V21.0 June 21, 2023

Select the part of multi-lingual content that corresponds MERGEFIELD switches - \L


to the language the client machine is set to (content
localization)
Identify the column name, if a column label has been MERGEFIELD switches - \N
defined
Identify content as HTML code MERGEFIELD switches - $
Establish a link between source data tables Table
Columns

To display MERGEFIELD codes, click ALT + F9.


To hide MERGEFIELD codes, click ALT + F9 again.

Save your work regularly in case of a loss of connection.


9. Click Save.
10. To run your report, click Compile and then Execute.
If you have unselected the FrontCube program checkbox in Properties, you only
need to click Execute.
The system executes all the templates linked to the current document, and makes
all the templates available for download.
All the executed reports are stored in the Attachments section of the document.
11. (Optional) To view the automatically generated source code, open the Source tab.

4.4.5.6. Define options for document generation


When executing a document, eFront Report executes by default all the templates that
are linked to it and generates the reports. Nevertheless, you can modify the settings
and only execute a selected template at report generation. In this case, when clicking
Execute, users will be asked which template they want to execute.

You can specify the folder where you want the reports to be saved to.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
The document editor opens.
3. On the General page, in the Options section:
a. (Optional) Under Save in directory, indicate the target folder.

Page 50 of 169
eFront Report User Guide - V21.0 June 21, 2023

b. Select Select document to generate.


• (Optional) Tick Generate PDF files.
When generating PDF documents, you need an Aspose licence which is the
corresponding server component for PDF file generation.
You can also define PDF security options for the generated file through an
eFront Script program.
The following parameters are available to additionally set up PDF options:
• PDF_PASSWORD_OWNER
• PDF_PASSWORD_USER
• PDF_ACCESSRIGHT
• PDF_ACCESSRIGHT_OTHER
These can be set as variables in eFront Script or can be user-entered
parameters.

Parameter Description Example


PDF_PASSWORD_OWNER Sets the password for the %Let PDF_PASSWORD_OWNER = "123456"
owner of the PDF file who has
full access.
PDF_PASSWORD_USER The password for the user. If %Let PDF_PASSWORD_USER = "";
user password is not defined,
owner password is taken as
user password.
PDF_ACCESSRIGHT Available values: %Let PDF_ACCESSRIGHT = "ALLOWOTHER

- ALLONWNONE - The user


has only read access.

- ALLOWOTHER -
Looks at the
PDF_ACCESSRIGHT_OTHER
parameter.

Page 51 of 169
eFront Report User Guide - V21.0 June 21, 2023

PDF_ACCESSRIGHT_OTHER Available values: %Let PDF_ACCESSRIGHT_OTHER =


"ALLOWPRINT;ALLOWCOPY;ALLOWNOTATI
- ALLOWPRINT - Allow the
user to print document.

- ALLOWCOPY - Allow the


user to copy/paste document
content.

- ALLOWNOTATION - Allow
the user to add notes to the
document.

See Include eFront Script programs in a report for more info on how to
include the program.
4. Click Save.
5. Click Compile, then Execute.
6. Select the template to execute.
7. Click Apply.
eFront Report generates the report.

Generation errors display right underneath.


If you defined a folder where to save the report to, the report is now part of this
folder.

4.4.5.7. Define input parameter and link to data tables


Input parameters are programs that are used during report generation, and ensure
that only relevant data is extracted from the database. Report data can be dynamically
filtered by users. For example, when issuing a report on funds, users indicate for
which fund they want the report to be generated. This sort of dynamic user input is
managed via input parameters. For any given report, users have the possibility to select
one or more input parameters (funds, security classes, portfolio companies, ...) before
launching the report. To gather input parameters, a data selection form displays when
the report is launched, such as this one:

The data selection page depends on your input parameter definition.

In the following, we show you how to define the input parameters. Working with input
parameters includes two main steps:

Page 52 of 169
eFront Report User Guide - V21.0 June 21, 2023

• Define the input parameter.


• Link the input parameter and the data column of data table to be used with the input
parameter.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
The document editor opens.
3. In the Parameters section, click Add.
The application appends a new line to the Parameters table.
4. Enter the required information.
For details, see The Parameters Form, and the Parameter Informats.
5. Click Save.
6. To filter data tables of the document according to the input parameter:
a. In the Tables section, select a data table.
b. Click Modify.
The data table editor opens.
c. In the Filters section, click Add.
The application appends a new line to the Filters table.
d. In the Name field, select the column to be filtered by the input parameter.
e. In the Criteria field, enter the parameter name.
f. Click OK.
g. Click Save.
7. To test the report, and click Compile, then Execute.
The dynamic parameter displays before report generation.

4.4.5.8. Include eFront Script programs in a report


You can attach eFront Script programs to the document from which EXCEL and/or
WORD reports are generated. eFront Report executes these programs before building
the report. If you want to update the table data or create a data table to use for the
reports, include a data update or a data table creation program.

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Identify the location of the program to include.

Page 53 of 169
eFront Report User Guide - V21.0 June 21, 2023

3. Copy the access path to the program to the clipboard.


4. Open an eFront Report document.
5. Access the Options section.
6. Paste the program access path into the Include field, and add the name of the
program.
Programs can also be referenced directly, if the program access has been specified
in the eFront Report's Administrator settings.
To allow eFront Report objects to easily access included programs, include
program access paths in the database system options.
a. From the main application menu, click Administration >Guide.
b. From the Guide's themes, select FrontReport.
c. Click Explorer.
d. In the Administration section, click System options.
e. Click the Magnifier icon at the right of the Search paths field.
The eFront Report directories' tree displays.
f. Select the directory that contains programs.
g. Click OK.
From now on, when you include a program that is contained in the directory
specified into an eFront Report object, you don't have to specify the access
paths.
Instead of writing: &INCLUDE "\\MDUVINAGE(Private]
\Programs\Test_program";
you only need to write: &INCLUDE "Test_program";
7. Click Save.
When executing the document, eFront Report runs the program(s) before
executing the report template.
8. To view the automatically generated source code, click on Pages > Source tab.

Page 54 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5. EXCEL macros

When generating an .XLS file from an eFront Report document, you activate a merge
process, i.e.: source data taken from the eFront Report data warehouse are merged
into the .XLS file. You control the merge process through the use of EXCEL macros. To
allow EXCEL macros to execute correctly, you must:

• Define the region where values display using the EF_T() or EF_TC() macro.
• Place the EXCEL macros above or at the left of the region of values.
• Macros are executed from left to right, and from top to bottom.
• There is no processing on the client, all processing is done on the server.

Here is an overview of available EXCEL macros (demos are available in the document
FrontReport - EXCEL macros - Tutorials):

Category Purpose Macro


Data display Extract an unique source data value. EF_G()
Strips HTML tags from HTML-rich text, , and renders EF_HTMLTOTEXT()
the text without the tags.
Insert an image in the EXCEL spreadsheet. EF_IMG()
Import a data region from an EXCEL file EF_IMPORT()
Develop multilingual reports. According to the EF_LANG()
language being chosen, EF_LANG() picks the
appropriate language token.
Retrieve macro variable content. Macro variables are EF_MACRO()
defined using %LET and %PARAM statements.
Sorts a region of cells in the EXCEL spreadsheet. EF_SORT_CELLS()
Display data in a table (by rows). Specify the region EF_T()
where values display. The region expands vertically if
new values are added.
Display data in a table (by columns). Specify the EF_TC()
region where values display. The region expands
horizontally if new values are added.

Cell formatting Define the cell's background color, background EF_SETSHADING.IF()


pattern, and text color according to a condition.
Resizes the cell height (be careful when using EF_AUTOFIT.HEIGHT()
EF_AUTOFIT())
Resizes the cell width (be careful when using EF_AUTOFIT.WIDTH()
EF_AUTOFIT())

Page 55 of 169
eFront Report User Guide - V21.0 June 21, 2023

Merges automatically the cells of a range EF_MERGE_CELLS


Format source data (values). EF_V()
Tab management Manage the automatic translation of sheet names EF_SETSHEETNAME()
according to the language being chosen.
Split a workbook into multiple sheets, and creates EF_S()
one sheet per value of the column being chosen.
Page setup Insert a horizontal page break in the sheet EF_HBREAK()
Insert a vertical page break in the sheet EF_VBREAK()
Insert a footer at the bottom center of each report EF_SETCENTERFOOTER()
page.
Insert a header at the top center of each report page. EF_SETCENTERHEADER()
Insert a footer at the bottom left of each report page. EF_SETLEFTFOOTER()
Insert a header at the top left of each report page. EF_SETLEFTHEADER()
Insert a footer at the bottom right of each report page. EF_SETRIGHTFOOTER()
Insert a header at the top right of each report page. EF_SETRIGHTHEADER()

4.5.1. Data display - macros


Purpose Macro
Extracts an unique source data value. EF_G()
Strips HTML tags from HTML-rich text, , and renders the text without the tags. EF_HTMLTOTEXT()
Inserts an image in the EXCEL spreadsheet. EF_IMG()
Imports a data region from an EXCEL file EF_IMPORT()
Develops multilingual reports. According to the language being chosen, EF_LANG()
EF_LANG() picks the appropriate language token.
Retrieves macro variable content. Macro variables are defined using %LET and EF_MACRO()
%PARAM statements.
Sorts a region of cells EF_SORT_CELLS()
Displays data in a table (by rows). Specify the region where values display. The EF_T()
region expands vertically if new values are added.
Displays data in a table (by columns). Specify the region where values display. EF_TC()
The region expands horizontally if new values are added.
Defines the location where the legend is displayed. EF_CHART_LEGEND
Defines the location where the graph is displayed. EF_CHART_PLOTAREA

Page 56 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.1.1. EF_G()

Description
Extracts an unique source data value. You can specify extract criteria.

Syntax
=EF_G("table_name";"column";"criteria_column_1;criteria_column_n" ;
"value_of_column_1;value_of_column_n";"data_type")

Arguments

Argument Description
table_name name of source data table
column identifies the column from which to extract the unique value
criteria_column_1;criteria_column_n list of columns that are used as selection criteria
value_of_column_1;value_of_column_n list of values that are assigned to the criteria (filter);

When designing a filter for a column, you can use the dedicated
characters '@' and '$'. '@' allows you to build a filter that
references a specific value, ex.: '@D4'. If the specific value
pointed at is part of an adjustable region, it moves if the region
extends. To avoid this behavior, and reference an absolute value,
you need to use '@' together with '$', exemple: '@$D4;@C$5'.
Using dedicated characters is particular useful in case you need
to build pivot tables.
data_type allows you to force a data type. Possible values:

DATE | STRING | INTEGER | FLOAT | BOOLEAN

Example: =EF_G("table_name";"column";..."DATE")

Comment

• If the language used in EXCEL, and the language used in the eFront application are
different, you need to define the EXCEL report language from within your database!
• If you use EF_G() with criteria and values, EF_G() returns the first value being
retrieved.
• To make sure that the first value of the column to be extracted is a significant
value, sort the data column (see: Process source data tables) before applying the
EF_G()macro.

Page 57 of 169
eFront Report User Guide - V21.0 June 21, 2023

• You can also specify the line number from which to extract the unique data source
value: =EF_G("table_name";"column" ;;;line_number)

Example
=EF_G("T_PARTICIPATIONS";"CREATION_DATE")

=EF_G("T_CHIFFRES_CLES";"REPORTING_DATE";;;3)

=EF_G("T_CONTACT";"REVENUE";"FIRST_NAME;LAST_NAME";"Marc;Doe")

=EF_G("COMMITMENT";"COMMITMENT";"FUND_ID;VINTAGE_YEAR";"@$C5;@D$4
D");

It produces in lines all funds, in columns all vintage years and puts for each fund the
commitment in the correct vintage year column.

4.5.1.2. EF_HTMLTOTEXT()

Description
Strips HTML tags from HTML-rich text, and renders the text without the tags.

Syntax
=EF_HTMLTOTEXT("column_name")

Arguments

Argument Description
column_name Identifies the column where HTML rich text has be be stripped off HTML tags.

Comment

• If you strip the HTML tags out of your text, carriage returns, which are referred to by
the tag <p></p> get stripped out as well. To avoid this behavior, you need to make
sure that the word wrapping is applied to the EXCEL sheet cell.

Page 58 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.1.3. EF_IMG()
Description
Inserts an image in the EXCEL spreadsheet, in the worksheet, but no in the header/
footer.

Syntax
=EF_IMG("column_name";region;X;Y;W;H)

Arguments
Argument Description
column_name file name or column name. If file name, the name must include at least a ":" or a"\".
region Working area; reference to a cell or a region of cells, example: A1 or A1:B5

Extending a region is carried out through EXCEL insertion mechanisms:

-> Keeps EXCEL cells references

-> Automatic EXCEL ranges expanding


X;Y;W;H image position, value unit: percentage.

X,Y: define the upper-left point of image

W: width of region covered by the image

H: height of region covered by the image

Example:

=EF_IMG("image";A1:B5;50;50;80;60)

Explanation: the image starts in cell A1, 50% from the upper left corner to the right and to
the bottom. The region being covered by the image is 80% of width, and 60% of height of
A1:B5

Percentages don't need to have a '%' sign after it, if they have, it doesn't work.

4.5.1.4. EF_IMPORT()
Description
Imports a data region from an EXCEL workbook sheet into the report to generate. You
must attach the EXCEL workbook to import sheets from to the FrontReport document,
from with you generate the report:

Page 59 of 169
eFront Report User Guide - V21.0 June 21, 2023

Syntax
=EF_IMPORT("&file";"sheet";"import_region";"host_region")

Arguments
Argument Description
file Name of the EXCEL workbook that includes the sheet from which to import the data region.
The workbook must be attached to the FrontReport document from which you generate the
report. The name of the workbook to import must be prefixed by '&', such as this: "&jfg.XLS"
sheet Name of the sheet that hosts the data region to import
import_region Reference to the cell or region of cells to import, example: A1 or A1:B5
host_region Reference to the cell or region of cells that hosts the data to import, example: A1 or A1:B5;
must cover the same number of cells/lines as import_region

Comment

• import_region and host_region must cover the same number of cells/lines.


• It is possible, although not recommended, to import a file from the client's hard drive.
Here is an example: =EF_IMPORT("C:\temp\Insert_charts_in_sheets.xls";"Carrier
Asian Real Estate Partn";"B2:G10";"E3:K11")
• Importing a data region might be handy, if you want to prepare a chart that should
be inserted into a report. In this case you might want to model the chart definition,
using a data sheet that includes predefined data series from which to build the chart.
• If using EF_IMPORT together with EF_T()/EF_TC(), be careful about the position of
the imported data region. EF_T()/EF_TC() might modify the spreadsheet by adding
lines/columns. In this case, place the imported data region above the spreadsheet
part being modified.
• A demo is available in the document FrontReport - EXCEL macros - Tutorials.

Examples

• =EF_IMPORT("&jfg.XLS";"Feuil1";"B2:G10";"E3:K11")

4.5.1.5. EF_LANG()
Description
Allows you to develop multilingual reports. According to the language being chosen,
EF_LANG() picks the appropriate language token.

Page 60 of 169
eFront Report User Guide - V21.0 June 21, 2023

Syntax
=EF_LANG("English_name{F}French_name")

OR

=EF_LANG("&name")

OR

=EF_LANG(cell_address)

Arguments

Argument Description
&name Name of column whose data are to be converted. Converts all values that are of following
type: "English_name{F}French_name"
cell_address References the cell (ex.: A1) whose data are to be converted. The cell might contain the
name of the column whose data are to be converted (&Name) or data of the following type:

"English_name{F}French_name"

Comment

• The string that is passed to EF_LANG() must be of the following type:


"English_name{F}French_name".
• To translate sheet names, use EF_SETSHEETNAME().

4.5.1.6. EF_MACRO()

Description
Allows to retrieve macro variable content. Macro variables are defined using %LET and
%PARAM statements.

Syntax
=EF_MACRO("macro_name")

Page 61 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
macro_name Name of the macro whose values are to be retrieved.

Example
%PARAM REF_DATE LABEL="Date";

=EF_MACRO("REF_DATE")

4.5.1.7. EF_SORT_CELLS()
Description
Allows you to sort a region of cells in the EXCEL spreadsheet.

Syntax
=EF_SORT_CELLS(region;"nb_sort_column_1;nb_sort_column_n")

Arguments

Argument Description
region Working area to be sorted; reference to region of cells, example:
A1:B5

Page 62 of 169
eFront Report User Guide - V21.0 June 21, 2023

nb_sort_column_1;nb_sort_column_n nb_sort_column_n: integer that refers to the number of the column


within the region being specified.

Mandator.

Example:

If a region stretches over 6 columns as in the region:

EF_SORT_CELLS( B5:G9,"1;3-")

the column referred to by 1 refers to the column B,

the column referred to by 3 refers to the column D.

You could also use any of the remaining columns as sort columns:

the column referred to by 2 would refer to the column C,

the column referred to by 4 would refer to the column E,

the column referred to by 5 would refer to the column F,

the column referred to by 6 would refer to the column G.

To refer to an ascending order: enter only the column number.

To refer to a descending order: postfix the column number by '-'.

Comment

• You can use EF_SORT_CELLS() to sort cell regions, but you can also add a
particular parameter to EF_T() and EF_TC() macros.

Example
Define a spreadsheet region, and sort the first column of the region in ascending order,
and the third column of the region in descending order.

Formula
EF_SORT_CELLS( B5:G9,"1;3-")

Page 63 of 169
eFront Report User Guide - V21.0 June 21, 2023

Result

4.5.1.8. EF_T()
Description
Specifies a region in the EXCEL spreadsheet, where source data are displayed
according to a selection of criteria. When executing the EXCEL spreadsheet, eFront
Report writes the source data into the region being specified by EF_T(). If the number
of values exceeds the spreadsheet space being allotted, new lines are added, and the
exceeding values are written to the new lines. It is possible to nest EF_T() macros.

Syntax
=EF_T("table_name";region;"insert";"column_1;column_n";
"value_of_column_1;value_of_column_n";"nb_lines_to_display";"nb_sort_column_1;nb_
sort_column_n";"alias")

Arguments

Argument Description
table_name Name of source data table, i.e. the table that is linked to the report
region Working area; reference to a cell or a region of cells, example: A1
or A1:B5

Extending a region is carried out through EXCEL insertion


mechanisms:

-> Keeps EXCEL cells references

-> Automatic EXCEL ranges expanding

Page 64 of 169
eFront Report User Guide - V21.0 June 21, 2023

insert insert refers to the insertion mode used to extend the region
(insert table lines)

'R': each line of the table is created by inserting a new line in the
worksheet

'R+': Sorts values in ascending mode

'R-': Sorts values in descending mode

'C': each line of the table is created by shifting cells to the bottom
(to put side by side two EF_T() tables, you need to use the 'C'
insertion mode for table 2.)

'': each line of the table is created by overwriting existing cells.

'R2', 'C2': idem for graphics


column_1;column_n List of columns on which a filter is applied
value_of_column_1;value_of_column_n List of values used to filter the columns.

Example:

"FUND_STATUS";"0" --> FUND_STATUS = 0

"FUND_STATUS";"<=0" --> FUND_STATUS <= 0

"FUND_STATUS;FUND";"<>0;XXX" --> FUND_STATUS <> 0 &


FUND = 'XXX'

When designing a filter for a column, you can use the dedicated
characters '@' and '$'. '@' allows you to build a filter that
references a specific value, ex.: '@D4'. If the specific value
pointed at is part of an adjustable region, it moves if the region
extends. To avoid this behavior, and reference an absolute value,
you need to use '@' together with '$', exemple: '@$D4;@C$5'.
Using dedicated characters is particular useful in case you need
to build pivot tables.
nb_lines_to_display Integer, that refers to the number of lines to display.

To display the first N lines of the region, enter a positive integer.

To display the last N lines of the region, enter a negative integer.

Page 65 of 169
eFront Report User Guide - V21.0 June 21, 2023

nb_sort_column_1;nb_sort_column_n nb_sort_column_n: integer that refers to the number of the


column within the region that should be used as sort criteria.

Example:

If a region stretches over 6 columns as in the region:

EF_T("TABLE";B5:G5;"R";;;;"1 ;3-" )

the column referred to by 1 refers to the column B,

the column referred to by 3 refers to the column D.

You could also use any of the remaining columns as sort columns:

the column referred to by 2 would refer to the column C,

the column referred to by 4 would refer to the column E,

the column referred to by 5 would refer to the column F,

the column referred to by 6 would refer to the column G.

To refer to an ascending order: enter only the column number.

To refer to a descending order: postfix the column number by '-'.

The region of cells sorted is the final cell region producted by


EF_T().
alias Allows you to assign an alias to the EF_T() macro.

This is interesting when nesting EF_T() macros, because it allows


you to clearly identify any of them.

The alias can then be used in a &COLUMN statement:


&ALIAS.COLUMN, to ensure that the value is taken from a
specific EF_T()

Comment

• If the language used in EXCEL, and the language used in the eFront application are
different, you need to define the EXCEL report language from within your database!
• Before using the display options R+ and R-, sort the source data table by the data field
you want to apply the options to. On the sorted data table, R+ reproduces data in the
same order as in the source table, whereas R- applies the opposite sort.
• A 7th parameter is also available that allows you to sort the region being referred to in
EF_T().

Page 66 of 169
eFront Report User Guide - V21.0 June 21, 2023

• To nest areas, use EF_TC() in an EF_T(), and EF_T() in EF_S().


• To put side by side two EF_T() tables, you need to use the 'C' insertion mode for table
2.
• Demos are available in the document FrontReport - EXCEL macros - Tutorials.

Example 1
=EF_T("QV_REPORT37_NOTES";A18:G24;"R";"COMPANY_ID;NOTE_TYPE";"&comp
any_id;KEYEVENT")

Example 2
=EF_T("QV_REPORT37_NOTES";A18:G24;"R";"COMPANY_ID;NOTE_TYPE";"&comp
any_id;KEYEVENT";"2")

Example 3
=EF_T("FV_T_FUND_POSITIONS_BY_INVESTMENT";C5:G5;"R";"FUND_STATUS;VI
NTAGE_YEAR";"@A1;>@B1")

Example 5
Use aliases to refer to specific EF_T() macros.

Consider the 2 tables:

Page 67 of 169
eFront Report User Guide - V21.0 June 21, 2023

If you want to output the tree representing these data (EFT2 is linked to EFT1 with
relationship EFT2.PARENT=EFT1.CODE):

You can use the following template. Note in cells B4 and C4 the use of the alias A,
defined in the first EF_T (cell B2). Alias parameter is the 8th of the EF_T() macro. If you
do not use alias, cells B4 and C4 are populated by the second EF_T (table EFT2).

Example 5
Define a spreadsheet region, and create new lines for new values

Formula

Page 68 of 169
eFront Report User Guide - V21.0 June 21, 2023

Result

4.5.1.9. EF_TC()

Description
Specifies a region in the EXCEL spreadsheet, where source data display according to a
selection of criteria. When executing the EXCEL spreadsheet, eFront Report writes the
source data into the region being specified by EF_TC(). If the number of values exceeds
the spreadsheet space being allotted, new columns are added, and the exceeding
values are written to the new columns.

Syntax
=EF_TC("table_name";region;"insert";"column_1;column_n";
"value_of_column_1;value_of_column_n";"nb_lines_to_display";"nb_sort_column_1;nb_
sort_column_n")

Arguments

Argument Description
table_name name of source data table
region Working area; reference to a cell or a region of cells, example: A1
or A1:B5

Extending a region is carried out through EXCEL insertion


mechanisms:

-> Keeps EXCEL cells references

-> Automatic EXCEL ranges expanding

Page 69 of 169
eFront Report User Guide - V21.0 June 21, 2023

insert insert refers to the insertion mode used to extend the region
(insert table columns)

'R': each column of the table is created by inserting a new column


in the worksheet

'R+': Sorts values in ascending mode

'R-': Sorts values in descending mode

'C': each column of the table is created by shifting cells to the


right

'': each column of the table is created by overwriting existing cells.

'R2', 'C2': idem for graphics


column_1;column_n List of columns on which a filter is applied
value_of_column_1;value_of_column_n list of values used as filter on the columns

When designing a filter for a column, you can use the dedicated
characters '@' and '$'. '@' allows you to build a filter that
references a specific value, ex.: '@D4'. If the specific value
pointed at is part of an adjustable region, it moves if the region
extends. To avoid this behavior, and reference an absolute value,
you need to use '@' together with '$', exemple: '@$D4;@C$5'.
Using dedicated characters is particular useful in case you need
to build pivot tables.
nb_lines_to_display Integer, that refers to the number of lines to display.

To display the first N lines of the region, enter a positive integer.

To display the last N lines of the region, enter a negative integer.

Page 70 of 169
eFront Report User Guide - V21.0 June 21, 2023

nb_sort_column_1;nb_sort_column_n nb_sort_column_n: integer that refers to the number of the


column within the region that should be used as sort criteria.

Example:

If a region stretches over 6 columns as in the region:

EF_TC("TABLE";B5:G5;"R";;;;"1 ;3-" )

the column referred to by 1 refers to the column B,

the column referred to by 3 refers to the column D.

You could also use any of the remaining columns as sort columns:

the column referred to by 2 would refer to the column C,

the column referred to by 4 would refer to the column E,

the column referred to by 5 would refer to the column F,

the column referred to by 6 would refer to the column G.

To refer to an ascending order: enter only the column number.

To refer to a descending order: postfix the column number by '-'.

The region of cells sorted is the final cell region produced by


EF_TC().

Comment

• If the language used in EXCEL, and the language used in the eFront application are
different, you need to define the EXCEL report language from within your database!
• Before using the display options R+ and R-, sort the source data table by the data field
you want to apply the options to. On the sorted data table, R+ reproduces data in the
same order as in the source table, whereas R- applies the opposite sort.
• A 7th parameter is also available that allows you to sort the region being referred to in
EF_TC().
• To nest areas, use EF_TC() in an EF_T(), and EF_T() in EF_S().
• Demos are available in the document FrontReport - EXCEL macros - Tutorials.

Example 1
EF_TC("TABLE";B5:G5;"R";;;;"1 ;3-" )

Page 71 of 169
eFront Report User Guide - V21.0 June 21, 2023

Example 2
Define a spreadsheet region, and create new columns for new values

Formula

Result

4.5.1.10. EF_CHART_LEGEND()
Description
Defines the location where the legend is displayed.

Syntax
=EF_CHART_LEGEND("chart";"xpos";"ypos";"width";"height")

Arguments

Argument Description
chart The name of the chart.
xpos The X position of the legend inside the chart.
ypos The Y position of the legend inside the chart.
width The width of the legend inside the chart.
height The height of the legend inside the chart.

Page 72 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.1.11. EF_CHART_PLOTAREA()

Description
Defines the location where the graph is displayed.

Syntax
=EF_CHART_PLOTAREA("chart";"xpos";"ypos";"width";"height")

Arguments

Argument Description
chart The name of the chart.
xpos The X position of the graph inside the chart.
ypos The Y position of the graph inside the chart.
width The width of the graph inside the chart.
height The height of the graph inside the chart.

4.5.2. Cell formatting - macros


Purpose Macro
Resizes the cell height EF_AUTOFIT.HEIGHT()
Resizes the cell width EF_AUTOFIT.WIDTH()
Merges automatically the cells of a range EF_MERGE_CELLS
Defines the cell's background color, background pattern, and text color according EF_SETSHADING.IF()
to a condition.
Format source data (values). EF_V()

4.5.2.1. EF_AUTOFIT.HEIGHT()

Description
Resizes the cell height

Syntax
=EF_AUTOFIT.HEIGHT(region)

Page 73 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments
Argument Description
region reference to a cell or a region of cells, example: A1 or A1:B5
factor optional;

The coefficient to multiply the height of the cell or a region of cells. Should be used only if some
columns are truncated after resizing without specifying the factor.

Examples
=EF_AUTOFIT.HEIGHT(A1:A2)

4.5.2.2. EF_AUTOFIT.WIDTH()
Description
Automatically adjusts the cell width to its content.

Syntax
=EF_AUTOFIT.WIDTH(region, factor)

Arguments
Argument Description
region reference to a cell or a region of cells, example: A1 or A1:B5
factor optional;

The coefficient to multiply the width of the cell or a region of cells. Should be used only if some
columns are truncated after resizing without specifying the factor.

Examples
=EF_AUTOFIT.WIDTH(A1:A2)

Comment
If you apply the EF_AUTOFIT.WIDTH() macro to a description field, it can occur that the
amount of characters in the field stretches the column width beyond limits. In this case
you will get an error message, which might be similar to the following:

"Specified argument was out of the range of valid values... Width must be between 0.0
and 255.0"

Page 74 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.2.3. EF_MERGE_CELLS()
Description
This macro is very useful to merge automatically cells of a region in the EXCEL
spreadsheet.

Syntax
=EF_MERGE_CELLS(cell_region;"merge_type")

Arguments

Argument Description
cell_region Reference to a region of cells to merge, example: A1:B5
merge_type Optional; defines the type of merger.

The following values are available:

--> BYCOL: merges cells column by column independently

--> ALL: merges cells in hierarchical order, default option

4.5.2.4. EF_SETSHADING.IF()
Description
Defines the cell's background color, background pattern, and text color according to a
condition. Up from eFront Report version 6.2, you can use the EXCEL formatting instead
of EF_SETSHADING.IF().

Syntax
=EF_SETSHADING.IF(region_1;"expression";"bckg_color,text_color,
bckg_pattern";region_2;"indentation")

Arguments

Argument Description

Page 75 of 169
eFront Report User Guide - V21.0 June 21, 2023

region_1 References a cell or a region of cells (example: A1 or A1:B5) whose values are to be
compared to the expression that is part of EF_SETSHADING.IF().

If you reference a cell that references a table column, region_1 must be composed of at least
2 cells in adjacent lines.
expression The expression evaluates to a value that is compared to the region_1 values. The %
operator can also be used to apply formatting to a cell that contains a specific string.
bckg_color HTML color keyword or hexadecimal code (#xxxxxx)
text_color HTML color keyword or hexadecimal code (#xxxxxx)
bckg_pattern Possible values:

AUTOMATIC

CHECKER

CRISSCROSS

DOWN

GRAY16

GRAY25

GRAY50

GRAY75

GRAY8

GRID

HORIZONTAL

LIGHTDOWN

LIGHTHORIZONTAL

LIGHTUP

LIGHTVERICAL

SEMIGRAY

SOLID

UP

VERTICAL
region_2 Cell or region of cells, that undergoes change in color if values in region_1 compare
successfully to the expression.

Page 76 of 169
eFront Report User Guide - V21.0 June 21, 2023

indentation
Only available from V9.0 on.

Size of indentation (1 to n) to apply to region_2 if the condition is true on region_1.

Comment

• If region_1 and region_2 cover the same dimension, each cell value of region_1 is
compared with the result of the expression in order to know if the corresponding cell in
region_2 has to be changed.
• region_1 and region_2 can be identical.
• EF_SETSHADING.IF() must always be used together with a region defined by EF_T()
or EF_TC().
• The EF_T() /EF_TC() macro must precede the EF_SETSHADING.IF() macro (be
placed above or at the left).
• Make sure to place the EF_SETSHADING.IF() macro at a location where it is read
after the cells to compare with the <expression> are populated. Most often you may
need to place the macro at the right of the cells to be evaluated. Recall that EXCEL
spreadsheet macros are being evaluated from left to right and from top to down (Z
order).

Example
=EF_SETSHADING.IF(A3:A9;"<=2";"BLUE";B3:B9)

From V9.0 on

=EF_SETSHADING.IF(A3:A9;"<=2";"BLUE";B3:B9;"1")

=EF_SETSHADING.IF(D3:R12;"%test";"#A00000";D3:R12)

4.5.2.5. EF_V()

Description
Formats source data.

Syntax
=EF_V("column_name";"format";"data_type")

Page 77 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
format Any of the below:

• numeric EXCEL picture, example: =EF_V("column_name";" ### ### ##0.00")


• reference to a spreadsheet cell that contains a format, example: =EF_V("column_name";"
&A1:A1")
• reference to a column that contains formats, example: =EF_V("column_name";" &FormatX")
data_type Allows to force a data type. Possible values:

DATE | STRING | INTEGER | FLOAT | BOOLEAN

If you use data_type, no need to use format.

Example: =EF_V("XXX";;"DATE")

Comment

• When defining data formats, you need to use 'M' for months and 'm' for minutes.
• The arguments format and data_type are mutually exclusive.
• When defining a numeric picture, use "#" and "0". "#": if there is a number it displays,
if there is not, nothing displays. "0": if there is a number it displays, if there is not, a "0"
displays.
• If EF_V() references a column or a spreadsheet cell that contains the format picture,
EF_V()must always be used together with a region defined by EF_T() or EF_TC(). The
cell that contains the format picture must be placed above or at the left of the display
region.
• To find more details about customized EXCEL formats for dates or numbers, type a
date/number in a cell, right click the cell, select personalized formats, and select
one, or build a new one.
• A demo is available in the document FrontReport - EXCEL macros - Tutorials.
• The format "[$-309]j mmmm aaaa" allows you to express a date in written letters. You
could combine text with an eFront Script date, and define the format so that the date is
written out in letters. Here is an example: Cell A2 containts an eFront Script date. Cell
A1 references the date in A2, and produces a written date in A1: ="SUBSCRIPTION
AS OF " & TEXTE(A2;"[$-309]j mmmm aaaa". The result would be: "SUBSCRIPTION
AS OF 3 March 2008". Please note that you need to use capital 'M's to refer to
months.

Page 78 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.3. Tab management - macros


Purpose Macro
Manage the automatic translation of sheet names according to the language EF_SETSHEETNAME()
being chosen.
Split a workbook into multiple sheets, and create one sheet per value of the EF_S()
column being chosen.

4.5.3.1. EF_SETSHEETNAME()
Description
Manages the automatic translation of sheet names according to the language being
chosen.

Syntax
=EF_SETSHEETNAME("English_name{F}French_name")

Arguments

Argument Description
English_name sheet name in English
French_name sheet name in French

Comment

• According to the language being chosen, FrontReport picks the appropriate language
token.
• To translate column content, use EF_LANG().

4.5.3.2. EF_S()
Description
Splits a workbook into multiple sheets, and creates one sheet per value of the column
being chosen.

Syntax
=EF_S("table_name";"column_1;column_n")

Page 79 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
table_name Name of the source data table
column_1;column_n List of columns, for the values of which sheets are to be created

Comment

• If the language used in EXCEL, and the language used in the eFront application are
different, you need to define the EXCEL report language from within your database!
• To nest areas, use EF_TC() in an EF_T(), and EF_T() in EF_S().
• If you use EF_S() together with EF_T() or EF_TC(), you must filter the data being
displayed in the data region according to the sheet being selected.
• A demo is available in the document FrontReport - EXCEL macros - Tutorials.

4.5.4. Page setup - macros


Purpose Macro
Insert a horizontal page break in the sheet EF_HBREAK()
Insert a vertical page break in the sheet EF_VBREAK()
Insert a footer at the bottom center of each report page. EF_SETCENTERFOOTER()
Insert a header at the top center of each report page. EF_SETCENTERHEADER()
Insert a footer at the bottom left of each report page. EF_SETLEFTFOOTER()
Insert a header at the top left of each report page. EF_SETLEFTHEADER()
Insert a footer at the bottom right of each report page. EF_SETRIGHTFOOTER()
Insert a header at the top right of each report page. EF_SETRIGHTHEADER()
Determines the number that is used to start page numbering. EF_FITTOPAGES()
Determines which page is the first page in the output. EF_FIRSTPAGENUMBER()

4.5.4.1. EF_HBREAK()
Description
Inserts a horizontal page break into the EXCEL sheet.

Syntax
=EF_HBREAK(cell_address)

Page 80 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
cell_address References the cell (ex. : A1), below of which, the page break will be inserted

4.5.4.2. EF_VBREAK()

Description
Inserts a vertical page break into the EXCEL sheet.

Syntax
=EF_VBREAK(cell_address)

Arguments

Argument Description
cell_address References the cell (ex. : A1), at the right of which, the page break will be inserted

4.5.4.3. EF_SETCENTERFOOTER()

Description
Inserts a footer at the bottom center of each report page.

Syntax
=EF_SETCENTERFOOTER(cell_address)

Arguments

Argument Description
cell_address References the cell (ex. : A1), that contains data to display at the bottom center of each
report page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Page 81 of 169
eFront Report User Guide - V21.0 June 21, 2023

Comment

• A demo that shows how to insert a header is available in the document FrontReport -
EXCEL macros - Tutorials.

4.5.4.4. EF_SETCENTERHEADER()

Description
Inserts a header at the top center of each report page.

Syntax
=EF_SETCENTERHEADER(cell_address)

Arguments

Argument Description
cell_address References the cell (ex. : A1), that contains data to display at the top center of each report
page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Comment

• A demo that shows how to insert a header is available in the document FrontReport -
EXCEL macros - Tutorials.

4.5.4.5. EF_SETLEFTFOOTER()

Description
Inserts a footer at the bottom left of each report page.

Syntax
=EF_SETLEFTFOOTER(cell_address)

Page 82 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
cell_address References the cell (ex. : A1), that contains data to display at the left bottom of each report
page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Comment

• A demo that shows how to insert a header is available in the document FrontReport -
EXCEL macros - Tutorials.

4.5.4.6. EF_SETLEFTHEADER()

Description
Inserts a header at the top left of each report page.

Syntax
=EF_SETLEFTHEADER(cell_address)

Arguments

Argument Description
cell_address References the cell (ex. : A1), that contains data to display at the left top of each report page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Comment

• A demo is available in the document FrontReport - EXCEL macros - Tutorials.

Page 83 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.5.4.7. EF_SETRIGHTFOOTER()

Description
Inserts a footer at the bottom right of each report page.

Syntax
=EF_SETRIGHTFOOTER(cell_address)

Arguments

Argument Description
cell_address References the cell (ex. : A1), that contains data to display at the bottom right of each report
page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Comment

• A demo that shows how to insert a header is available in the document FrontReport -
EXCEL macros - Tutorials.

4.5.4.8. EF_SETRIGHTHEADER()

Description
Inserts a header at the top right of each report page.

Syntax
=EF_SETRIGHTHEADER(cell_address)

Arguments

Argument Description

Page 84 of 169
eFront Report User Guide - V21.0 June 21, 2023

cell_address References the cell (ex. : A1), that contains data to display at the top right of each report
page.

If the header content is dynamic, i.e. EXCEL has to calculate the cell content, you must
place the header content cell above the macro that contains the macro definition.

If the header content is static, like a simple text string for example, you can place the header
content cell below the macro cell.

Comment

• A demo that shows how to insert a header is available in the document FrontReport -
EXCEL macros - Tutorials.

4.5.4.9. EF_FITTOPAGES()
Description
Scales the data to fit a specific number of pages.

Syntax
=EF_FITTOPAGES("wide";"tall")

Arguments

Argument Description
wide Defines how many pages in width the output will be.

mandatory.
tall Defines how many pages in height the output will be.

optional.

4.5.4.10. EF_FIRSTPAGENUMBER()
Description
Determines the number that is used to start page numbering.

Syntax
=EF_FIRSTPAGENUMBER("value")

Page 85 of 169
eFront Report User Guide - V21.0 June 21, 2023

Arguments

Argument Description
value Can be:

• an integer
• a reference to a cell
• a eFront Script variable

4.5.5. PDF Generation - macros


Purpose Macro
Adds a watermark to a report that is generated as PDF. EF_PDFWATERMARK()

4.5.5.1. EF_PDFWATERMARK
Description
Adds a watermark to a report that is generated as PDF.

Syntax
=EF_PDFWATERMARK(text,font,opacity,angle)

Options

Option Description
text Text to be displayed as the watermark. Can be a reference to a cell or static text.
font Font used to display the watermark.
opacity Transparency of the watermark, a value from 0.0 (opaque) through 1.0 (clear).
angle Rotation angle of the watermark in degrees.

Example
=EF_PDFWATERMARK(V2,”Arial”,”0.3”,”45”)

Page 86 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6. WORD Mergefield switches and keywords

When generating a .DOC file from an eFront Report document, you activate a merge
process, i.e. source data taken from the eFront Report data warehouse are merged
into the .DOC file. You control the merge process through the merge fields, and their
customization. Mergefields show in your .DOC file when you drag and drop table data
into the document. You can control mergefields using conditional MERGEFIELDs.

Here is an overview on available WORD mergefield switches and keywords:

Purpose WORD mergefield keyword / switch


Columns
Insert an EXCEL chart CHART
Extract a unique column value Get
Include a link HYPERLINK
Insert an image IMG
Define the information to be repeated for each table entry Loop
Apply a condition to source data MERGEFIELD switches - \w
Define the background color of a column MERGEFIELD switches - \s
Format currencies, numbers, and telephone numbers MERGEFIELD switches - #
Format data and time MERGEFIELD switches - @
Hide column values MERGEFIELD switches - \e
Select the part of multi-lingual content that corresponds to the MERGEFIELD switches - \L
language the client machine is set to (content localization)
Identify the column name, if a column label has been defined MERGEFIELD switches - \N
Identify content as HTML code MERGEFIELD switches - $
Establish a link between source data tables Table
Columns

To display MERGEFIELD codes, click ALT + F9.

To hide MERGEFIELD codes, click ALT + F9 again.

4.6.1. Columns
4.6.1.1. Description
?

Page 87 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.1.2. Syntax
{MERGEFIELD "Columns: }

4.6.1.3. Switches

Switch Description

4.6.2. CHART

4.6.2.1. Description
Inserts one single EXCEL chart into a WORD document. To display MERGEFIELD
codes, press ALT + F9.

If you want to insert several charts into a WORD document, use the eFront Script
step EXPORTCHART to extract all the charts from the EXCEL file into as many .JPEG
files as there were charts, and then use the WORD keyword IMG to insert all the charts
into the WORD document.

4.6.2.2. Syntax
{MERGEFIELDCHART \N "Excel_file_name.XLSX"\S"Sheet1"\C"Chart 1" }

4.6.2.3. Switches

Switch Description
\N "Excel_file_name.XLSX" Identifies the EXCEL file, which contains the chart
\S"Sheet1" Identifies the EXCEL sheet, which contains the chart
\C"Chart 1" Identifies the chart to be inserted

4.6.2.4. Comment

• At report execution time, the chart is extracted from the EXCEL file, converted into a
JPEG file, and then included in the WORD document.

Page 88 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.3. Get

4.6.3.1. Description
Extracts the first value of a data table column, and inserts it in the WORD document. To
display MERGEFIELD codes, press ALT + F9.

4.6.3.2. Syntax
{MERGEFIELD "Get:table_name/column_label"\Ncolumn_name}

4.6.3.3. Switches
Switch Description
\Ncolumn_name Identifies the column name, if a column label has been defined. Column labels can be
bilingual labels, such as "First closing date{F}Date of first closing"
\$ HTML Identifies the column content as being HTML code

4.6.3.4. Comment

• To make sure that the first value of the column to be extracted is a significant value,
sort the data column (see: Process source data tables) before applying the Get:
macro.

4.6.4. HYPERLINK

4.6.4.1. Description
Identify a column value as link to include the WORD document. To display
MERGEFIELD codes, press ALT + F9.

4.6.4.2. Syntax
{HYPERLINK {MERGEFIELD "column_label" \Ncolumn_name}}

4.6.4.3. Comment

• By default, WORD converts hyperlinks in the data source fields to plain text in the
WORD document!

Page 89 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.4.4. Example
Step-by-step procedure Result and explanation
1. Select Field from the Insert menu.
2. Select Hyperlink from the Field names list.
3. Click OK.

The text "Error! Hyperlink reference not valid" appears in the document.
4.Click ALT + F9 to show merge field codes
5. Drag and drop the data source hyperlink field into the .DOC hyperlink field {HYPERLINK
"{MERGEFIELD "Web" \N
WEB}"}
6.Click ALT + F9 to hide merge field codes

4.6.5. IMG

4.6.5.1. Description
Identify an image to include in the WORD document. To display MERGEFIELD codes,
press ALT + F9.

4.6.5.2. Syntax
{MERGEFIELDIMG \Ncolumn_name} |

{MERGEFIELDIMG \N "path_to_image_file"}

4.6.5.3. Switches
Switches Description
\W: "width" Possible units for width and height are cm or mm. Postfix the number. Example:
\H: "height
{MERGEFIELDIMG \Ncolumn_name\W "12,5cm"}

4.6.6. Loop

4.6.6.1. Description
Defines the information to be repeated for each table entry. To display MERGEFIELD
codes, press ALT + F9.

Page 90 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.6.2. Syntax
{MERGEFIELD Loop:table_name}

<info_to_repeat>

{MERGEFIELD "\Loop"}

4.6.6.3. Comment

• Each element that you want to be repeated must be placed within the loop tags. The
<info_to_repeat> can be a text string, a data column, etc.
• To avoid carriage returns between lines, place the ending tag "\Loop" in the same line
as the data to display. But don't place the beginning tag Loop in the same line as the
data to display, as this generates an error.
• The loop repeats as long as different values for the "Company" column can be found.
eFront Report replaces the column reference by its value when executing the report.

4.6.7. MERGEFIELD switches

4.6.7.1. Description
Use mergefield switches to process source data that be included in the WORD template.
To display MERGEFIELD codes, press ALT + F9.

4.6.7.2. Syntax
{MERGEFIELDcolumn_name}

4.6.7.3. Switches

Switch Description
\@ Formats source data as date.

{MERGEFIELD date \@ "d MMMM yyyy"}

The picture switch is case-sensitive. Additionally, you must use quotation marks around
the picture string.

According to your regional settings, be careful to choose "d" and "y" or "j" and "a"!

Page 91 of 169
eFront Report User Guide - V21.0 June 21, 2023

\$ Identifies source data as HTML code

{MERGEFIELD "column_label" \Ncolumn_name\$HTML_code}

HTML_Code has to be set to one of the following values:

HTML: Read and display HTML

HTML-NODIV: Replace all the <div> tags by <span> before displaying the HTML
\# Identifies a numeric picture. By default, WORD does not retain the numeric pictures
specified in eFront Report data tables. Therefore you must redo the formatting, using
WORD numeric pictures.

Example for a currency:

{MERGEFIELD "column_label" \Ncolumn_name\# "$### ### ### ##.00"}

Example for a phone number:

{MERGEFIELD phone \# "###'-'###'-'####"}

The hyphen inside the merge field is in single quotation marks.

#: number place holder

0.00: forces two digitals

%: division by 100

Example for a date:

{MERGEFIELD "Get:FOF/FIRST closing date{F}Date premier closing" \N


FIRST_CLOSE_DATE\# "dd mmmm yyyy"}

Up from eFront Invest V6.5, you need to replace 'm' by capital 'M' when referring to a
month!
\e Indicates that the value of the column specified by using the \N switch, must not be
displayed, but referred to in a calculation or a comparison

{MERGEFIELD "column_label" \Ncolumn_name\e}

Example:

{MERGEFIELD\NSECURITY_TYPE_CODE\e \s ""ACTION"=#BFC7EO;
"OPTION"=#BFC7EO; "BSA"=#BFC7EO"}

Page 92 of 169
eFront Report User Guide - V21.0 June 21, 2023

\L Selects the part of multi-lingual content that corresponds to the language the client
machine is set to (content localization).

Examples:

The language on your client is set to English. The content of the data table to process is
in French and English, such as: "Label{F}Libellé". When applying the \L switch, only the
English content is merged into the WORD document.

{MERGEFIELD "column_name"\L}

{MERGEFIELDSUBST_NOM\L}

{MERGEFIELD "Libellé"\NTACHE_NOM\L}

{MERGEFIELD "Get:T_STRUCTURE/Capital"\L}
\Ncolumn_name Identifies the column name, if a column label has been defined.

{MERGEFIELD "column_label"\Ncolumn_name}
\s Defines the background color of a column and/or the color of the text.

{MERGEFIELD "column_label" \Ncolumn_name\scolor}

color: red | yellow | green | ...

Example:

{MERGEFIELD\NSECURITY_TYPE_CODE\e \s ""ACTION"=#BFC7EO;
"OPTION"=#BFC7EO; "BSA"=#BFC7EO"}
\w Applies a condition to source data.

{MERGEFIELD "column_label" \Ncolumn_name\w "<condition>"}

Example:

Example: Mergefield switch \w

4.6.7.4. Comment
• You can combine switches.

4.6.7.5. Example
• {MERGEFIELD "Get:T_STRUCTURE/Capital" \N CAPITAL \# "### ### ### ##0"}

\#: introduces the numeric picture

#: represents a number

Page 93 of 169
eFront Report User Guide - V21.0 June 21, 2023

0: last number must be a zero

• {MERGEFIELD "Get:T_STRUCTURE/Mezzanine(%)" \N MEZZANINE_PRCT \#


"0.00%"}

\#: introduces the numeric picture

0.00: forces two digitals

%: division by 100

4.6.7.6. Example: Mergefield switch \w

Goal
Process conditions from with the MERGEFIELD statement: Test the value of a column.

Features being illustrated

• MERGEFIELD switches

Initial table

COMPANY INDEX
Company A 1
Company B 1
Company C 1
Company D 2
Company E 2
Company F 2

The statement used to display all the companies where INDEX = 1:

{MERGEFIELD TABLE:T_EXIT_COMPANIES_REPORT/ \w"INDEX=1";

The statement used to display all the companies where INDEX = 2:

{MERGEFIELD TABLE:T_EXIT_COMPANIES_REPORT/ \w"INDEX=2";

Page 94 of 169
eFront Report User Guide - V21.0 June 21, 2023

Result

Page 95 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.8. Conditional MERGEFIELDs

4.6.8.1. Description
You can define conditional MERGEFIELDs, and use IF controls. To display
MERGEFIELD codes, press ALT + F9.

There is another, alternative way of processing conditions in MERGEFIELD


statements: use the \w switch. For details, refer to MERGEFIELD switches.

4.6.8.2. Syntax for a simple {IF} field


{IF {MERGEFIELDcolumn_name} <OP> "<value>" "<true_condition>" "<false
condition>"}

4.6.8.3. Syntax for a nested {IF} structure


{IF {MERGEFIELDcolumn_name1} <> "" "{IF {MERGEFIELDcolumn_name2} <> "" "{IF
{MERGEFIELDcolumn_name3} <> "" "True" "False"}" "False"}" "False"}

4.6.8.4. Comment
• <OP>: any operator, such as "=", "<>", etc.
• The quotation marks are used to denote the parameters of the conditional statements,
and are not included in the printed result of the merge. If you want to include quotation
marks in your result, you must include a backslash (\) before each quotation mark that
you want to include.
• The comma has also a spacial use inside the {IF} field. Therefore, use the backslash
before a comma as well as before the quotation mark.
• In addition, the backslash has a special use inside the {IF} field. Therefore, use a
backslash before a backslash. In other words, use two backslashes if you want one to
appear in the merged document.
• It is possible to nest {IF} fields. The {IF} field does not directly support Boolean AND
and OR operations in a mail merge. However, the logical AND and OR operators are
actually just abbreviations of nested IF statements; therefore, you can construct the
equivalent of Boolean AND and OR operations using the following syntax:

• OR: Position the second test inside the second set of quotation marks: {IF field = "A"
"result" "{IF field = "B" "TrueResult" "FalseResult"}"}

Page 96 of 169
eFront Report User Guide - V21.0 June 21, 2023

• AND: Position the second test inside the first set of quotation marks:{IF field <> "A"
"{IF field <> "B" "TrueResult" "FalseResult"}" "FalseResult"}

4.6.8.5. Example

1. For example, if you want to print Now is the time..., in your document when the
true condition is met, you must place a backslash before each quotation mark. The
conditional statement should look similar to the following: {IF {MERGEFIELD name}
= "John Doe " "\"Now is the time...\"" "<false condition>"}
2. For example to have the result "John said, "The file is in F:\My Documents"", the
{IF} field would have a format similar to this: {IF {MERGEFIELD name} = "John Doe"
"John said, \"The file is in F:\\My Documents\"" "false condition"}
3. Example of nested {IF} fields
4. {MERGEFIELD "Get:FOF/Term(Years)"\N TERM_YEARS} {IF {MERGEFIELD
"Get:FOF/Number of years"\N TERM_ADD} <> """{IF {MERGEFIELD "Get:FOF/
Number of years"\N TERM_ADD}<>0 "+{MERGEFIELD "Get:FOF/Number of
years"\N TERM_ADD}"""}" years

4.6.9. Table

4.6.9.1. Description
Establishes a link between source data tables in the WORD document. To display
MERGEFIELD codes, press ALT + F9.

4.6.9.2. Syntax
{MERGEFIELD Table: table_to_connect\w "ID_table_1=&ID_table_to_connect"}

4.6.9.3. Switches

Switch Description
\w <condition> Identifies a condition to apply.

4.6.9.4. Comment

• &: precedes data values.

Page 97 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.6.9.5. Example
Step-by-step procedure Result and explanation
1. Drag and drop the table Always drop the table into a table cell!
2. Display WORD field codes: Click ALT + F9.

If a label had been defined for the table, it could


be that the table name that displays is different
when clicking ALT + F9.
3. Include the \w condition switch, and define {MERGEFIELD Table:T_INFO_BUSINESS/ \w
the key of the relation between the two tables: "COMPANY_ID=&T_PARTICIPATIONS.COMPANY_ID"}»

{MERGEFILED Table: table_to_connect\w


"ID_table_1=&ID_table_to_connect"}

\w: precedes a condition

&: precedes data values.


4. Hide WORD field codes: Click ALT+F9
5. Define the information to select from the
table being linked:

Page 98 of 169
eFront Report User Guide - V21.0 June 21, 2023

4.7. Functions - Operators - Values

Available functions process:

• Numbers
• Character strings
• Dates
• Functions - files and folders

Find also special functions:

• Random/lag/parent...

And:

• Operators

And:

• Special values
• Specifying values or value ranges

4.7.1. Functions - numbers


Function Description Example
ABS(<number>) Returns the absolute value of
<number>. <number> = double
ACOS(<number>) Returns the inverse cosine
(arccosine) of <number>
ASIN(<number>) Returns the inverse sine (arcsine) of
<number>
ATAN(<number>) Returns the inverse tangent
(arctangent) of <number>
CBOOL(<expression>) Returns a boolean value for an
<expression>
CDATE(<expression>) Converts an expression into a date.
CDBL(<expression>) Converts an <expression> to a
double.

Page 99 of 169
eFront Report User Guide - V21.0 June 21, 2023

CEILING(<number>) Returns the smallest integer not less Refer to example:


than <number>. <number> = double
WEEKDAY()
CINT(<expression>) Converts an expression to the Refer to example:
nearest integer.
ROUND()_CINT()
COS(<number>) Returns the cosine of <number>
COSH(<number>) Returns the hyperbolic cosine of
<number>
CSTR(<expression>) Converts an <expression> into a
character string.
DISTRIBNORM (<mean>, Returns a random number normally PROC PRINT;
<stdev>) distributed.
PUT DISTRIBNORM(10,5);

Not available for eFront Cube RUN;


programs.
DISTRIBTRIANG(<min>, <max>, Returns a random number on a PROC PRINT;
<median>) triangle distribution.
PUT
DISTRIBTRIANG(0,10,5);
Not available for eFront Cube
programs. RUN;
E Returns the exponential value for
base=1
EXP(<number>) Returns the exponential value for
base=<number>
FLOOR(<number>) Returns the largest integer less than
or equal to <number>. <number> =
double
LOG(<number>) Returns the logarithm for
base=<number>
LOG10 Returns the logarithm for base=10
MAX(<number-1> ... <number-n) Returns the maximum value amidst
the numbers being specified.
MIN(<number-1> ... <number-n) Returns the minimum value amidst
the numbers being specified.

Page 100 of 169


eFront Report User Guide - V21.0 June 21, 2023

N0(<number-1>,<number-2>) Returns 0 if the absolute value of Example:


<number-1> is inferior to <number-2>
If NB_SHARES=2, then:

N0(NB_SHARES,0.001)
returns 2.

If NB_SHARES=0.00001,
then:

N0(NB_SHARES,0.001)
returns 0.
PI Returns the value for PI (prime
counting function).
POW(<number-1>, <number-2>) Returns the value of <number-1>
power <number-2>
RANDOM(integer) Returns a random number from the PROC PRINT;
range between 0 and <integer>
PUT RANDOM(10);

RUN;
ROUND(<value>, Rounds the <value> to the nearest Refer to example:
<remaining_digitals>) integer.
ROUND()_CINT()
<remaining_digitals>=0: rounds the
value to the nearest integer, no
digitals

<remaining_digitals>=1: rounds the


value to the nearest integer, 1 digital

<remaining_digitals>=n: rounds the


value to the nearest integer, n digital
ROUNDINGMETHOD(<value>, Round the <value> with precision
<remaining_digitals>, given by <remaining_digitals>, by
"<method>") applying a specific method :

--> "LOWER"

--> "UPPER"

--> "NEAREST"
RND() Returns a random number between 0
and 1.
SIN(<number>) Returns the sine of <number>
SINH(<number>) Returns the hyperbolic sine of
<number>

Page 101 of 169


eFront Report User Guide - V21.0 June 21, 2023

SQRT(<number>) Returns the square root of <number> Refer to example:

PROC MEANS - MEAN -


SUM - SQRT()
TAN(<number>) Returns the tangent of <number>
TANH(<number>) Returns the hyperbolic tangent of
<number>
TOBOOL(<expression>) Returns a boolean value for an
<expression>
TODAT(<expression>) Converts an expression into a date.
TODBL(<expression>) Converts an <expression> to a
double.
TOINT(<expression>) Converts an expression to an integer.
TOSTR(<expression>) Converts an <expression> into a
character string.

4.7.2. Functions - character strings


Function Description Example
ASC(<char>) Returns the ASCII code of a
character
CHR(<UNICODE_code>) Converts <UNICODE_code> STR1 = 'Oliver';
to <char>
STR2 = 'Michel';

STR = STR1 + CHR(11) +


STR2;

Result:

Oliver

Michel

Comment: CHR(11) allows you


to concatenate two strings in a
cell a start each string in a new
line. You need to insert a a VT
(Vertical tabulation).
COMPRESS(<string>) Removes all blanks from a A=' Robert and Mary ';
<string>.
B=COMPRESS(A);

Result : 'RobertandMary';

Page 102 of 169


eFront Report User Guide - V21.0 June 21, 2023

CRLF() Returns WINDOWS STR1 = 'Oliver';


compatible new line character
(CRLR). STR2 = 'Michel';

This may be useful if STR = STR1 + CRLF() + STR2;


concatenating strings.
Result:

Oliver

Michel
CSTR<expression> Converts an <expression> into
a character string
FIND(<string-1>, <string-2>) Returns the position of A='ROBERT';
<string-2> in <string-1>,
positive integer. B=FIND(A,'B');

If <string-2 is not part of Result: 3


<string-1>, the result = '0'.

Comparison starts from the


left.
FORMAT(<string>, <format>) Applies the <format> to the 'd/M/yyy'
<string>
INSTR(<string-1>, <string-2>) Returns the start position A='ROBERT';
of the <string-2> within
<string-1>, comparison starts B=INSTR(A,'BERT');
from the left. Returns 0, if
search is unsuccessful Result: 3
LANG("<string>{f}<Frenchstring>") Localizes the input <string> LANG("Fund{F}Fonds"} returns
based on the application Fund if the application language
current language settings is set to English, Fonds if it is
set to French.
LCASE(<string>) Converts all letters in a A='ROBERT';
<string> to lowcase
B=LOWCASE(A);

Result: 'robert'
LEFT(<string>,<length>) Returns the characters on A='Robert';
the left of a <string>, with
the returned string's length = B=Left(A,2);
<length>
Result: 'Ro'
LEN(<string>) Returns the length of the A='Robert';
<string>
B=LEN(A);

Result: 6

Page 103 of 169


eFront Report User Guide - V21.0 June 21, 2023

LENGTH(<string>) Returns the length of the A='Robert';


<string>
B=LENGTH(A);

Result: 6
LOWCASE(<string>) Converts all letters in a A='ROBERT';
<string> to lowcase
B=LOWCASE(A);

Result: 'robert'
LTRIM(<string>) Removes all trailing blanks A=LTRIM(' Robert');
on the left, and returns the
trimmed argument as a result. Result: "Robert"
Blanks within the string are
replaced by a single blank.
MID(<string>, <position>, <length>) Returns a substring of a A='Robert';
<string>. The substring is
identified by its start position B=MID(A,2,4);
and length.
Result:'ober'
REPLACE(<string>, Replaces in a <string>, A='movement';
<string_to_replace>, <new_string>) the <string_to_replace> by a
<new_string> B=REPLACE(A,"e","i");

Result:'mivimint'
RIGHT(<string>, <length>) Returns the characters on A='Robert';
the right of a <string>, with
the returned string's length = B=RIGHT(A,4);
<length>
Result: 'bert'
RTRIM(<string>) Removes all trailing blanks A=RTRIM('Robert ');
on the right, and returns the
trimmed argument as a result. Result: "Robert"
Blanks within the <string> are
replaced by a single blank
SPLIT(<string>, <separator>) Creates a collection of PROC PRINT;
items. Comma is the default
separator. PUT SPLIT("a,b,c,d");

RUN;
STRIP(<string>) Returns a character string with
all leading and trailing blanks
removed
SUBSTR(<variable>, <position>, Returns TRUE | FALSE. A='Robert';
<length>) =<string> SUBSTR compares <string> to
the substring of the variable B=(SUBSTR(A,1,2)='Ro');
identified by its start position
and length. Result : True

Page 104 of 169


eFront Report User Guide - V21.0 June 21, 2023

TRIM(<string>) Removes all trailing blanks, A=TRIM("Robert and Mary");


and returns the trimmed
argument as a result. Blanks Result: "Robert and Mary"
within the string are replaced
by a single blank. TRIM
is useful for concatenating
because concatenation does
not remove trailing blanks.
TRIM (X) = LTRIM(RTRIM(X))
UCASE(<string>) Converts all letters in a string A='robert';
to uppercase
B=UCASE(A);

Result: 'ROBERT'
UPCASE(<string>) Converts all letters in a string A='robert';
to uppercase
B=UPCASE(A);

Result: 'ROBERT'
GETURLWEBSITE () Returns the URL of the current %LET MYVAR =
website GETURLWEBSITE();

PROC PRINT;

PUT %MYVAR;

RUN;

4.7.3. Functions - dates


Function Description Examples
CDATE(<expression>) Converts an Refer to example:
expression
into a date. WEEKDAY()

Page 105 of 169


eFront Report User Guide - V21.0 June 21, 2023

DATEADD("<period>",<nb>,<date>) Adds <nb> Refer to examples:


times the
<period> to a DATEADD() - FORMAT()
specified
DATEDIFF() - SEMESTERENDDATE() - 2
<date>.
DATEDIFF() - QuarterBegDate() - DateADD()
<period>:
DAY | WEEK | Another example:
MONTH |
QUARTER | TEST_DATE =
YEAR (DATEADD("WEEK,-1,%EDATE));

<nb>: integer Substracts One week from date %EDATE


(<nb> can be
a negative
value, and the
period is
substracted
<nb> times
from the
<date>)

<date>: date
value

Page 106 of 169


eFront Report User Guide - V21.0 June 21, 2023

DATEDIFF("<period>",<date-1>,<date-2>) Returns the Refer to examples:


difference
between DATEDIFF() - FORMAT()
<date-1> and
DATEDIFF() - SEMESTERENDDATE() - 1
<date-2>,
expressed in DATEDIFF() - SEMESTERENDDATE() - 2
<period>.
DATEDIFF() - QuarterBegDate() - DateADD()
<period>:
DAY | WEEK |
MONTH |
QUARTER |
YEAR |
SEMESTER*

*defines a
period of 6
months

if <date-1> <
<date-2>, the
result is
positive

if <date-1> >
<date-2>, the
result is
negative
DATESERIAL(<year>, <month>, <day>) Returns the PROC PRINT;
date
corresponding PUT FORMAT(DATESERIAL(2006,5,13),"d/M/
to <year>, yyyy");
<month> and
RUN;
<day>
Note that you need to use an upper-case m
(M) for the month. If a lower-case m is used,
the program will return '0' for the month as the
lower-case m represents minutes.

Result: 13/5/2006
DAY(<date>) Returns the Refer to example:
day of the
date value. DMY() - MDY() - FORMAT()

Page 107 of 169


eFront Report User Guide - V21.0 June 21, 2023

DAYOFYEAR(<date>) Returns the PROC PRINT;


number of the
day, the first PUT DAY("18/07/2006");
january being
RUN;
the number 1.
Result: 199
DML(<date>) Puts the date PROC PRINT;
in the right
format for the PUT DML("31/12/2016");
database
(SQL Server). RUN;
DMY(<day>,<month>,<year>) Returns the Refer to example:
day, the
month, and DMY() - MDY() - FORMAT()
the year from
a date value.
FORMAT(<date>, "<format>") Applies a Refer to examples:
format to a
date. YMD() - FORMAT()

<date>: a DMY() - MDY() - FORMAT()


date or a
PROC EXPORT - FORMAT()
column
whose type is
being set to
DATE

<format>:
date picture,
example:
"d/M/yyyy"
"dd/MM/yyyy"
or "M/d/yyyy"
MDY(<date>) Returns the Refer to example:
month, the
day, and the DMY() - MDY() - FORMAT()
year from a
date value.

Page 108 of 169


eFront Report User Guide - V21.0 June 21, 2023

MONTH(<date>) Returns the Refer to example:


month from a
date value. DMY() - MDY() - FORMAT()

If used
together with
the CLASS
statement in a
PROC
MEANS step,
<date> is set
to the last day
of the month.
MONTHBEGDATE(<date>) Returns the PROC PRINT;
first day of the
month being PUT FORMAT(MONTHBEGDATE(Today()),
specified in "d/M/yyyy");
the date
RUN;
value.
Note that you need to use an upper-case m
(M) for the month. If a lower-case m is used,
the program will return '0' for the month as the
lower-case m represents minutes.

Result: the first day of the current month


MONTHENDDATE(<date>) Returns the PROC PRINT;
last day of the
month being PUT FORMAT(MONTHENDDATE(Today()),
specified in "d/M/yyyy");
the date
RUN;
value.
Note that you need to use upper-case m (M) for
the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Result: the last day of the current month


NOW() Returns the Refer to example:
current date
and time. PROC SQLTABLE - (2)

Page 109 of 169


eFront Report User Guide - V21.0 June 21, 2023

QUARTER(<date>) Returns the PROC PRINT;


quarter that
the date is in. PUT QUARTER("19/08/2016");

If used RUN;
together with
Result: 3
the CLASS
statement in a Refer to example:
PROC
MEANS step, DATEDIFF() - QuarterBegDate() - DateADD()
<date> is set
to the last day
of the quarter.
QUARTERBEGDATE(<date>) Returns the PROC PRINT;
first day of the
quarter being PUT FORMAT(QUARTERBEGDATE(TODAY()),
specified in "d/M/yyyy");
the date
RUN;
value.
Note that you need to use upper-case m (M) for
the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Result: the first day of the current quarter

Refer to example:

DATEDIFF() - QuarterBegDate() - DateADD()


QUARTERENDDATE(<date>) Returns the PROC PRINT;
last day of the
quarter being PUT FORMAT(QUARTERENDDATE(TODAY()),
specified in "d/M/yyyy");
the date
RUN;
value.
Note that you need to use upper-case m (M) for
the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Result: the last day of the current quarter

Page 110 of 169


eFront Report User Guide - V21.0 June 21, 2023

SEMESTER(<date>) Returns the PROC PRINT;


semester that
the date is in. PUT SEMESTER ("19/08/2017");

If used RUN;
together with
Result: 2
the CLASS
statement in a Refer to example:
PROC
MEANS step, PROC MEANS - SUM - SEMESTER()
<date> is set
to the last day
of the
semester.
SEMESTERBEGDATE(<date>) Returns the PROC PRINT;
first day of the
quarter being PUT
specified in FORMAT(SEMESTERBEGDATE(TODAY()),"dd/
the date MM/yyyy");
value.
RUN;

Result: the first day of the current semester. Ex.:


current date = 24/01/2007; semester start date
= 01/01/2008

Note that you need to use upper-case m (M) for


the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.
SEMESTERENDDATE(<date>) Returns the PROC PRINT;
last day of the
semester PUT
being FORMAT(SEMESTERENDDATE(TODAY()),"dd/
specified in MM/yyyy");
the date
RUN;
value.
Result: the last day of the current semester. Ex.:
current date = 24/01/2007; semester end date =
30/06/2007

Note that you need to use upper-case m (M) for


the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Refer to example:

DATEDIFF() - SEMESTERENDDATE()_1

Page 111 of 169


eFront Report User Guide - V21.0 June 21, 2023

TICKCOUNT() Returns the PROC PRINT;


number of
milliseconds PUT TICKCOUNT();
since the
RUN;
system
started. Result: 130209282
TODAY() Returns the PROC PRINT;
current date
as a date PUT FORMAT(TODAY(), "d/M/yyyy");
value.
RUN;
(TODAY is
another name Note that you need to use upper-case m (M) for
for the DATE the month. If lower-case m is used, the program
function) will return '0' for the month as the lower-case m
represents minutes.

Result: the day of today


WEEKBEGDATE(<date>) Returns the PROC PRINT;
first day
(Monday) of PUT FORMAT(WEEKBEGDATE(TODAY()),
the week "d/M/yyyy");
being
RUN;
specified in
the date Note that you need to use upper-case m (M) for
value. the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Result: the date of Monday of the current week


WEEKDAY(<date>) Returns the PROC PRINT;
number of the
of the day PUT WEEKDAY(TODAY());
from within a
RUN;
week ( from a
date value). Result: returns the number of the current
day within the week (1:monday; 2: tuesday;
3:wednesday;...)

Refer to example:

WEEKDAY()

Page 112 of 169


eFront Report User Guide - V21.0 June 21, 2023

WEEKENDDATE(<date>) Returns the PROC PRINT;


last day
(Saturday) of PUT FORMAT(WEEKENDDATE(TODAY()),
the week "d/M/yyyy");
being
RUN;
specified in
the date Note that you need to use upper-case m (M) for
value. the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Result: the date of Saturday of the current week


WEEKOFYEAR(<date>) Returns the PROC PRINT;
number of the
week, the first PUT WEEKOFYEAR(TODAY());
week of
RUN;
january being
the week 1. Result: the number of the current week within
the year
YEAR(<date>) Returns the Refer to examples:
year from a
date value. DMY() - MDY() - FORMAT()

If used DATEDIFF() - QuarterBegDate() - DateADD()


together with
the CLASS
statement in a
PROC
MEANS step,
<date> is set
to the last day
of the Year.
YEARBEGDATE Returns the PROC PRINT;
first day of the
year from a PUT
specified FORMAT(YEARBEGDATE(TODAY()),"d/M/
value. yyyy");

RUN;

Result: returns the date of the first January of


the current year

Note that you need to use upper-case m (M) for


the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.

Page 113 of 169


eFront Report User Guide - V21.0 June 21, 2023

YEARENDDATE Returns the PROC PRINT;


last day of the
year from a PUT
specified FORMAT(YEARENDDATE(TODAY()),"d/M/
value. yyyy");

RUN;

Result: returns the date of the 31 December of


the current year.

Note that you need to use upper-case m (M) for


the month. If lower-case m is used, the program
will return '0' for the month as the lower-case m
represents minutes.
YMD(<year>, <month>, <day>) Returns the Refer to examples:
year, the
month, and YMD()
the day from
a date value. YMD() - FORMAT()

4.7.4. Functions - files and folders


Function Description Example
DIRECTORIES(<path>) Returns the number
of directories being
associated with the
<path>. Root="\\"

DIRECTORIES() supports
the following magic
variables:

--> {SHARED}

--> {PUBLIC}

--> {PRIVATE}

--> {INFO}

Page 114 of 169


eFront Report User Guide - V21.0 June 21, 2023

DIRECTORY(<n>) Returns the complete


path to the directory at
position <n>. <n>: integer,
comprised between 1
and DIRECTORIES().
DIRECTOR() sends the
directory at position <n>
into a temporary folder,
and makes it accessible.
DIRECTORYNAME(<n>) Returns the name of the
directory at position <n>.
<n>:

userid, comprised between


1 and DIRECTORIES().
The directory is not
extracted, and therefore it
is not accessible.
FILES(<path>) Returns the number of files FILES("\\{SHARED}\LOGOS")
being associated with the
<path>. Root="\\". Does --> interpreted as:
not take into account
"\\SHARED Region(company\LOGOS"
underlying folders!

FILES() supports the


following magic variables:

--> {SHARED}

--> {PUBLIC}

--> {PRIVATE}

--> {INFO}
FILE(<n>) Returns the complete path FOR I=1 TO FILES("\\FRONTVENTURE
to the file at position (Private)\Company\Files")
<n>. FILE() sends the
file at position <n> FICHIER = FILE(I);
into a temporary folder,
OUTPUT;
and makes it accessible.
<n>: integer, comprised NEXT;
between 1 and FILES().
RUN;

Refer to example:

FILENAME() - FILE()

Page 115 of 169


eFront Report User Guide - V21.0 June 21, 2023

FILENAME(<n>) Returns the name of Refer to examples:


the file at position <n>.
The file is not extracted, FILENAME() - FILE()
and therefore the file
LINKFILES() - LINKFILE() - FILENAME()
is not accessible. Use
FILENAME(), if the file
name only is important,
FILENAME() is quicker
than FILE()
FILESEXT(<path>, Retrieves the number of Example:
<extension>) files in <path>, in specified
<extension> PROC PRINT;

PUT FILESEXT("\\SHARED", ".pdf");

RUN;

Returns: 1
LINKFILES(<object_id>) Returns the number of Refer to examples:
files that are attached to
the object identified by the LINKFILES() - LINKFILE() - FILENAME()
<object_id>
LINKFILES() - LINKFILE() - FILENAME() -
%PARAM

%LET - LINKFILES() - LINKFILE()


LINKFILESEXT(<object_id>, Returns the number of Refer to examples:
<ext_1>; <ext_n>) files that are attached to
the object identified by LINKFILES() - LINKFILE() - FILENAME()
the <object_id>. Files are
For I=1 TO
filtered according to the list
of file extensions. LINKFILESEXT(COMPANY_ID,".PNG")

LOGO = LINKFILE(I);

OUTPUT;

NEXT;
LINKFILE(<n>) Returns the complete path use this function to retrieve and use
that leads to file <n> images
of the files attached to
an object. <n>: integer, Refer to example:
comprised between 1 and
LINKFILES() - LINKFILE() - FILENAME()
LINKFILES(). LINKFILE()
copies the file into a
temporary folder, and
makes it accessible.

Page 116 of 169


eFront Report User Guide - V21.0 June 21, 2023

LINKFILENAME(<n>) Returns the name of file


<n> of the files attached
to an object. <n>: integer,
comprised between 1 and
LINKFILES(). When using
LINKFILENAME(), the file
itself is not accessible.
MAKEDIRECTORY(<dir>) Creates a subdirectory Example:
in the current directory,
which you must define LIBNAME USER CURRENT;
(e.g. LIBNAME USER
PROC PRINT;
CURRENT)
PUT MAKEDIRECTORY("MyNewSubDir");

RUN;

Returns: True. The directory is created.

4.7.5. Functions - special


Function Description Example
APPENDPDF("<file_name1> Appends the content of an existing %LET
","<file_name2>") PDF file to another PDF file. MERGED_FILE=APPENDPDF("D:
\\eFront\\download\
Note that both PDF files must be \Document.pdf", "D:\\eFront\
located on the application server. \download\\Document2.pdf");
The program will not compile if one
or both files are attached to the PROC PRINT; PUT
program or stored elsewhere. %MERGED_FILE; RUN;

Result:
Not available for eFront Cube
programs All pages from Document2.pdf are
appended to Document.pdf.
CURRLITERAL(<value>, Converts a <value> into string. PUT CURRLITERAL (12.2,
<language>, <currency>, <language>: FRENCH | ENGLISH 'FRENCH', 'euro', 'cent');
'centime')
<currency>: EURO, FRANC, Result: douze euros et vingt cents
LIVRE, DOLLAR

Page 117 of 169


eFront Report User Guide - V21.0 June 21, 2023

CONVERTCURR(<amount>, Converts an <amount> from the Example:


<source_curr>, <source_curr> currency into the
<target_curr>, <date>) <target_curr> at the rate of a given RATE = CONVERTCURR
<date> (1, FUND_CURRENCY,
INVESTOR_CURRENCY,
If you reference an empty REFERENCE_DATE);
parameter is is critical that you use
" " instead of "" (see example) FX =
CONVERTCURR2(1,INVESTEE_F
UND_CCY,MANAGED_FUND_CC
Y,ENTRY_DATE,"
",CURRENCY_TABLE_IQID);
CONVERTCURR2(<amount Converts an <amount> from
>, <source_curr>, the <source_curr> currency into
<target_curr>, the <target_curr> at the rate
<date>,"<table_name>","<ta of a given <date>, using a
ble_id>") specific conversion table (given
by its id <table_id>, or its name
<table_name>)
COLLECTION("<table_name Returns a collection containing Example:
>", "<Column name>") all values of the specified Table/
Column %LET LIST_ID = COLLECTION
("FV_T_INFO_FUND",
"FUND_ID");
EXISTCOLUMN("<table_na Tests the existence of a column in
me>","<column_name>") a table
EXISTMACRO("<macro_na Tests the existence of a macro Refer to example:
me>")
%DEFINE
EXISTTABLE("<table_name Tests the existence of a table
>")
GETTEMPPATH() Returns the complete path of the Refer to example:
user's download on the webserver.
GETTEMPPATH()
Ex.:GETACCCO
'C:\inetpub\wwwroot\website\downl PROC EXPORTEXCEL -
oad\ GETTEMPPATH()
93930c959a734c8bb41f1324e23d
244a'
GETACCOUNTID() Returns the unique identification
number of the current account

Page 118 of 169


eFront Report User Guide - V21.0 June 21, 2023

GETCONTACTUSERID() Returns the ID of the specified Example:


contact.
PROC PRINT;

Only applies to eFront Cube PUT GETDEFAULTCONTACTID();


programs
RUN;
GETCURRENTUSERID() Returns the ID of the current user Example:

PROC PRINT;
Only applies to eFront Cube
programs PUT GETCURRENTUSERID();

RUN;

Returns:
D7CD41F68C6F456399A66ED3D
0BA906B
GETCURRENTUSERINFO(" Returns the user specified Example:
<fieldname>") <fieldname> value
PROC PRINT;

PUT
GETCURRENTUSERINFO("FIRS
TNAME1");

RUN;

Returns: Olivier
GETCURRENTUSERPROFI Returns the user's current profile Example:
LE() ID
%LET MyProfileName =
GETCURRENTUSERPROFILE();
Only applies to eFront Cube
programs TRACE "My current profile ID is: "
& %MyProfileName;
GETCURRENTUSERPROFI Not authored yet Not authored yet
LESLIST()
Only applies to eFront Cube
programs
GETUSERPROFILESLIST Returns the list of unique Example:
("<user_id>") identifiers of all the user's profile
(separated by ";") %LET MyProfiles =
GETUSERPFOILESLIST(GetUserI
D());

TRACE %MyProfiles;

Page 119 of 169


eFront Report User Guide - V21.0 June 21, 2023

GETDBSERVER() Returns the DB server type Example:

PROC PRINT;

PUT GETDBSERVER();

RUN;

Returns: MSSQL

Other possible values: "ACCESS",


"MSSQL"
GETDEFAULTUSERID() Returns the default user ID of the Example:
current user.
PROC PRINT;

Not available for eFront Cube PUT GETDEFAULTUSERID();


programs
RUN;
GETINFOREGIONID() Returns the ID of the INFO region. Example:

PROC PRINT;

PUT GETINFOREGIONID();

RUN;
GETPROFILEINFO("<user_i For the user identified by Example:
d>"," <field_name>") <user_id> returns the value of
<field_name> PROC PRINT;

PUT
GETPROFILEINFO(GETUSERID()
,"USERLIBPROFILE");

RUN;
GETPRIVATEEGIONID() Returns the ID of the PRIVATE PROC PRINT;
region.
PUT GETPRIVATEREGIONID();

RUN;
GETPUBLICREGIONID() Returns the ID of the PUBLIC PROC PRINT;
region.
PUT GETUBLICEREGIONID();

RUN;
GETSHAREDREGIONID() Returns the ID of the SHARED PROC PRINT;
region
PUT GETSHAREDREGIONID();

RUN;

Page 120 of 169


eFront Report User Guide - V21.0 June 21, 2023

GETUSERID() Returns the unique identification Refer to examples:


number of the current user
GETUSERID()_GETUSERINFO()

PROC EFRONTMENUS
- GETUSERPROFILE -
GETUSERID
GETUSERINFO("<user_id>", For the user identified by Example:
" <field_name>") <user_id> returns the value of
<field_name> PROC PRINT;

PUT "My current profile label is: " &


Only applies to eFront Cube GETUSERINFO(GETUSERID(),"U
programs SERLIBPROFILE");

RUN;

Refer to example (list of


meaningful <field_name> values):

GETUSERID()_GETUSERINFO()
GETUSERPROFILESLIST Returns the list of unique Example:
("<user_id>") identifiers of all the user's profile
(separated by ";") %LET MyProfiles =
GetUserProfilesList(GetUserID());

TRACE %MyProfiles;
GETUSERPROFILE Returns the unique identification Examples:
("<user_id>") number of the user's current profile
%LET MyProfileName =
GETUSERPROFILE(GETUSERID(
Only applies to eFront Cube ))
programs
PROC EFRONTMENUS
- GETUSERPROFILE -
GETUSERID
GUID() Returns a unique identification INVESTOR_ID = GUID();
number (Global Unique Identifier),
used in the eFront database
LAG(<column>) Selects the value of the preceding
line.

Performs the same as


PARENT(<column>)

Page 121 of 169


eFront Report User Guide - V21.0 June 21, 2023

LOCALIZE(<column>) Returns the column label in the Example:


language that corresponds to the
user's local settings. ...

COLUMN IRR LABEL="IRR(inv)


{F}TRI(inv)";

COLUMN IRR_LABEL;

IRR_LABEL = LOCALIZE(IRR);

...

Result:

If the user's local language =


"English", the value of IRR_LABEL
= "IRR(inv)"
LOOKUP("<table_name>" , Function that applies specifically to Refer to example:
<code>) the list of options being available
for additional fields. LOOKUP()_LOOKUPCODE()

Therefore you can only use this


function if additional fields have
been defined, and if a list of
options has been defined for the
additional field you refer to.

A list of options is a list of <code>


<label> entries. The <code> refers
to the value sent to the system
if the user selects an option. The
<label> refers to the label that
displays in the drop-down list from
which the user selects an option.

The LOOKUP() function returns


the value of the <label> column
that corresponds to the value
of the <code> column being
referenced to in the table
<table_name>

Page 122 of 169


eFront Report User Guide - V21.0 June 21, 2023

LOOKUPCODE("<table_nam Function that applies specifically to Refer to example:


e>" , "<label>") the list of options being available
for additional fields. LOOKUP()_LOOKUPCODE()

Therefore you can only use this


function if additional fields have
been defined, and if a list of
options has been defined for the
additional field you refer to.

A list of options is a list of <code>


<label> entries. The <code> refers
to the value sent to the system
if the user selects an option. The
<label> refers to the label that
displays in the drop-down list from
which the user selects an option.

The LOOKUPCODE() function


returns the value of the <code>
column that corresponds to the
value of the <label> column
being referenced to in the table
<table_name>
LOOKUPDYN("<table_name Retrieves the label for user lookup %LET Label
>","<column_name>","<code defined in a dynamic table. = LOOKUPDYN("Table",
>") "METATEXT1", "1");
Options:

<table_name> refers to the name


of the dynamic table.

<column_name> refers to the


name of the column that contains
the lookup.

<code> refers to the code of the


lookup.

Not available for eFront Cube


programs
NZ(<value-1>, <value-2>) Returns <value-1> if <value-1> is Refer to example:
not NULL, else, returns <value-2>
DATA - SET - IN

Page 123 of 169


eFront Report User Guide - V21.0 June 21, 2023

PARENT(<column>) Selects the value of the preceding


line.

Performs the same as


LAG(<column>)
PROFILE("<packageoption>" Returns the package option value Example:
,"<defaultvalue>") for the current profile, or the
default value. PROC PRINT;

PUT
PROFILE("PCKAJXPORTAL.SKIN
","METRO");

RUN;

Result:

The skin value is returned (metro,


aerial or legacy) or METRO, if the
first parameter isn't defined.
REGISTRY(<type>, <key>, Not authored yet. Examples:
<name>)
REGISTRY("ACCOUNT","AUDITI
<type> must be "ACCOUNT", NG","TABLES");
"USER", "TEMP" or "MEM"
Result: the list of tables being
audited (e.g.
ADMREGISTRY;ADMUSER;ajxrep
registry;VCFUND)

REGISTRY("ACCOUNT","AUDITI
NG","ENABLED_COLS");

Returns: 1

REGISTRY("USER","AJXPORTAL
","CONTENT");

Returns: the application language

Page 124 of 169


eFront Report User Guide - V21.0 June 21, 2023

SETLANGUAGE(<language Forces the language for %LET LANGUAGE =


>) localization of the strings in the SETLANGUAGE("J");
report (like caption of reference
tables in views). The user PROC PRINT;
language is used for localization by
PUT LOCALIZE("Hello World{J}お
default.
はよございます");

Not available with eFront PUT %LANGUAGE;


Cube programs.
RUN;

%LET LANGUAGE =
SETLANGUAGE(%LANGUAGE);

PROC PRINT;

PUT LOCALIZE("Hello World{J}お


はよございます");

PUT %LANGUAGE;

RUN;

Will return the following text:

おはよございます

Hello World

Page 125 of 169


eFront Report User Guide - V21.0 June 21, 2023

SETPDFMETADATA("<file_n Adds custom metadata to an DATA WORK.TMP;


ame>","<table_name>","<ke existing PDF file. The metadata is
y_column>",<"value_column sourced from a eFront Script table, SQL "SELECT A.FUND,
>") using set of keys and a set of A.ABBREVIATION FROM
values. VCFUND A WHERE ??FILTER;";

Note that the PDF file must be COLUMN FUND LABEL="Fund";


located on the application server.
COLUMN ABBREVIATION
The program will not compile if the
LABEL="Abbr";
PDF file is attached to the program
or located elsewhere. RUN;

Not available for eFront Cube %LET


programs MERGED_FILE=SETPDFMETAD
ATA("D:\\eFront\\download\
\Test.pdf", 'WORK.TMP', "FUND",
"ABBREVIATION");

PROC PRINT; PUT


%MERGED_FILE; RUN;

Result:

The custom properties of Test.pdf


are updated with data from
the FUND and ABBREVIATION
columns of the VCFUND table.
Note that, because ??FILTER is
used, the program uses only the
data that the user has access
rights to.
TABLEINFO("table", Returns information about Example:
"<info>") specified table. Information can
be : "ID", "USER", "DATE", %LET CREATION_DATE
"CLASS", "PATH", "NAME" = TABLEINFO
("FV_T_INFO_FUND", "DATE");
TABLENCOL("table") Returns the number of columns of
a data table.
TABLENOBS(table) Returns the number of rows of a Refer to example :
data table.
PROC PRINTFORM -
Interesting to use in control TABLENOBS() - %IF %THEN
structures where you need to test %END
if a table has some content.

Page 126 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.7.6. Operators

Operators with higher precedence are evaluated before operators with relatively lower
precedence. Operators in the same cell have equal precedence. When operators of
equal precedence appear in the same expression, a rule must govern which is evaluated
first. All binary operators except for the assignment operators are evaluated from left to
right; assignment operators are evaluated right to left.

Macro operators are prefixed by %.

Precedence Operator type Operators Example


1 unary NOT - -12
2 exponential, * / ^ ** MOD %FOR - %NEXT - MOD
multiplicative, modulo
3 additive +- 7-3
4 comparative IS NULL
IS NOT NULL
LIKE
NOT LIKE
IN, %IN %LET - %FOR - %NEXT

IN works only with collections (you


get them by using PARM with XID or
XPICKID), not with strings
NOT ... IN PROC SORT - (WHERE - NOT...IN)
BETWEEN(,)
NOT BETWEEN(,)
5 concatenation + - & || %FOR - %NEXT - MOD
6 relational <> <= >= < = >
7 logical AND
OR

4.7.6.1. Comment

• LIKE can be used together with the placeholder "%" in case you build a character
string with which to compare column values.
• Here is an example for using the operator BETWEEN:

Page 127 of 169


eFront Report User Guide - V21.0 June 21, 2023

SET TEMP1.[EFFV_CDW_T_COMPANY_TRANSACTION](WHERE CASH


BETWEEN(1,1000000));

4.7.7. Special values

Value Description Example


TRUE
FALSE
NULL | EMPTY | MISSING | NOTHING | used together with IS or IS IF name IS NOT NULL
"." NOT THEN ...

4.7.8. Specifying values or value ranges

Each occurrence of value-or-range is either one of the following:

<value_or_range> Possible values


<value> A single value, such as 15 or "instrument"
Enclose character values in single or double quotation marks.
Use the keyword OTHER as a single value. OTHER matches all values that do not
match any other value or range.
Value specifications are case-sensitive
<range> A list of values, for example, 14-98 or 'A'-'Z'
Enclose character strings in quotation marks
You can use LOW or HIGH as one value in a range, and you can use the range
LOW-HIGH to encompass all values.

Example :

LOW - 'Z' or 35 - HIGH

LOW-HIGH =' #,##0; (#,##0); 0';


Use the less than (<) symbol to exclude values from ranges.
If you are excluding the first value in a range, then put the < after the value. If you are
excluding the last value in a range, then put the < before the value. For example, the
following range does not include 0:

0<-100

Likewise, the following range does not include 100:

0-<100

Page 128 of 169


eFront Report User Guide - V21.0 June 21, 2023

If a value at the high end of one range also appears at the low end of another range,
and you do not use the < non-inclusion notation, then PROC FORMAT assigns the
value to the first range. For example, in the following ranges, the value AJ is part of the
first range:

'AA'-'AJ'=1 'AJ'-'AZ'=2

In this example, to include the value AJ in the second range, use the non-inclusive
notation on the first range:

'AA'-<'AJ'=1 'AJ'-'AZ'=2
If you overlap values in ranges, then PROC FORMAT returns an error message unless,
for the VALUE statement, the MULTILABEL option is specified. For example, the
following ranges will cause an error:

'AA'-'AK'=1 'AJ'-'AZ=2

Page 129 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8. Examples - functions and operators

The following examples illustrate functions:

• DATEADD() - FORMAT()
• DATEDIFF() - FORMAT()
• DATEDIFF() - SEMESTERENDDATE() - 1
• DATEDIFF() - SEMESTERENDDATE() - 2
• DATEDIFF() - QuarterBegDate() - DateADD()
• DMY() - MDY() - FORMAT()
• FILENAME() - FILE()
• GETTEMPPATH()
• GETUSERID()_GETUSERINFO()
• LINKFILES() - LINKFILE() - FILENAME()
• LINKFILES() - LINKFILE() - FILENAME() - %PARAM
• LINKFILES() - LINKFILE() - PROC MEMORY - Macro controls
• LOOKUP()_LOOKUPCODE()
• ROUND()
• WEEKDAY()
• YMD()
• YMD() - FORMAT()

The following examples illustrate operators:

• PROC SORT - (WHERE - NOT...IN)

4.8.1. DATEADD() - FORMAT()

4.8.1.1. Goal
Add a specified period to a given date.

4.8.1.2. Features being illustrated

• Functions - date

Page 130 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.1.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\EFRONT_SUP.2(Private)\TEST\EXAMPLES\TablesFormation";

/*Create the table that receives date formats*/

DATA TEST.ADDED_DATES;

COLUMN X_DATE TYPE=DATE LABEL="Today";

COLUMN X_DATE_DAY LABEL="Today + 1 DAY" WIDTH=160;

COLUMN X_DATE_MONTH LABEL="Today + 2 MONTHS" WIDTH=160;

COLUMN X_DATE_YEAR LABEL="Today + 10 YEARS" WIDTH=160;

X_DATE = TODAY();

X_DATE_DAY = FORMAT(DATEADD("DAY",1,X_DATE), "d/M/yyyy");

X_DATE_MONTH = FORMAT(DATEADD("MONTH",2,X_DATE), "d/M/yyyy");

X_DATE_YEAR = FORMAT(DATEADD("YEAR",10,X_DATE), "d/M/yyyy");

OUTPUT;

RUN;

//Display the result

PROC PRINT DATA=TEST.DATE_FORMATS LABEL NOOBS;

RUN;

4.8.2. DATEDIFF() - FORMAT()

4.8.2.1. Goal
Return the difference between two dates.

Page 131 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.2.2. Features being illustrated


• Functions - date

4.8.2.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\{Private}\TEST\EXAMPLES\TablesFormation";

/*Create the table that receives dates and difference*/

DATA TEST.DATES_DIFF;

COLUMN X_DATE_1 LABEL="Date 1" TYPE="DATE";

COLUMN X_DATE_2 LABEL="Date 2" TYPE="DATE";

/* if you don't specify the type of the column, eFront Script interprets the column type as
of being 'String', and not of 'Date'. DATEDIFF() then re-interprets the strings 'X_DATE_1
and X_DATE_2 to convert them into dates. According to the local settings, the strings
might be interpreted differently. For example '01/06/2007' can be interpreted as 'June, 1,
2007' or as 'January, 6, 2007'*/

COLUMN X_DATE_DIFF_DAY LABEL="Difference in days" WIDTH=150;

COLUMN X_DATE_DIFF_MONTH LABEL="Difference in months" WIDTH=150;

COLUMN X_DATE_DIFF_YEAR LABEL="Difference in years" WIDTH=150;

/*Note that you need to use an upper-case m (M) for the month. If a lower-case m is
used, the program will return '0' for the month.*/

X_DATE_1 = FORMAT(TODAY(),"d/M/yyyy");

X_DATE_2 = FORMAT(DATEADD("MONTH",10,X_DATE_1), "d/M/yyyy");

X_DATE_DIFF_DAY = DATEDIFF("DAY",X_DATE_1,X_DATE_2);

X_DATE_DIFF_MONTH = DATEDIFF("MONTH",X_DATE_1,X_DATE_2);

Page 132 of 169


eFront Report User Guide - V21.0 June 21, 2023

X_DATE_DIFF_YEAR = DATEDIFF("YEAR",X_DATE_1,X_DATE_2);

OUTPUT;

RUN;

PROC PRINT DATA = TEST.DATES_DIFF LABEL NOOBS;

RUN;

4.8.3. DATEDIFF() - SEMESTERENDDATE() - 1

4.8.3.1. Goal
Count the number of semesters between two dates.

4.8.3.2. Features being illustrated


• Functions - date

4.8.3.3. Program
//Create the alias to the folder to work in

LIBNAME TEST "\\{Private}\TEST\EXAMPLES\TablesFormation";

//Create the table that receives dates and difference*/

DATA TEST.DATES_DIFF;

COLUMN X_DATE_1 LABEL="Date 1" TYPE="DATE";

COLUMN X_DATE_2 LABEL="Date 2" TYPE="DATE";

/* if you don't specify the type of the column, eFront Script interprets the column type as
of being 'String', and not of 'Date'. DATEDIFF() then re-interprets the strings 'X_DATE_1
and X_DATE_2 to convert them into dates. According to the local settings, the strings
might be interpreted differently. For example '01/06/2007' can be interpreted as 'June, 1,
2007' or as 'January, 6, 2007'*/

COLUMN X_DATE_NB_SEMESTER LABEL="Number of semesters";

Page 133 of 169


eFront Report User Guide - V21.0 June 21, 2023

//Note that you need to use an upper-case m (M) for the month. If a lower-case m is
used, the program will return '0' for the month.

X_DATE_1 = FORMAT(YMD (2004,12,31),"dd/MM/yyyy");

X_DATE_2 = FORMAT(SEMESTERENDDATE(TODAY()),"dd/MM/yyyy");

X_DATE_NB_SEMESTER = DATEDIFF("SEMESTER",X_DATE_1,X_DATE_2);

OUTPUT;

RUN;

PROC PRINT DATA = TEST.DATES_DIFF LABEL NOOBS;

RUN;

4.8.4. DATEDIFF() - SEMESTERENDDATE() - 2

4.8.4.1. Goal
Test a series of instructions using DATEDIFF().

4.8.4.2. Features being illustrated


• Functions - date
• PUT statement

4.8.4.3. Program
//Test and write some examples.

PROC PRINT;

PUT "Closing date of the current semester: "


FORMAT(SEMESTERENDDATE(TODAY()), 'd/MM/yy');

PUT CRLF();

PUT "Number of semesters between 31/12/2004 and the closing date of the current
semester:"

Page 134 of 169


eFront Report User Guide - V21.0 June 21, 2023

DATEDIFF("SEMESTER","31/12/2004",SEMESTERENDDATE(TODAY()));

PUT CRLF();

PUT "Number of semesters between 31/12/2004 and the closing date of the current
semester + 1:"

DATEDIFF("SEMESTER","31/12/2004",DATEADD("DAY",1,SEMESTERENDDATE(TOD
AY())));

RUN;

4.8.5. DATEDIFF() - QuarterBegDate() - DateADD()

4.8.5.1. Goal
Create a table of quaterly positions.

4.8.5.2. Features being illustrated


• Functions - date
• %DO WHILE...%LOOP WHILE
• MIN statement

4.8.5.3. Program
//Declare macro variables

%Include "FV_For_Pages";

%Let Date = Today();

%Let Min_Date = "01012007"d;

/*

Proc Means Data = Work.Transactions Out = Work.Min_Date;

Min Reference_Date (Name = Min_Date);

Run;

Page 135 of 169


eFront Report User Guide - V21.0 June 21, 2023

Data Work.Min_Date;

Set Work.Min_Date;

%Let Min_Date = Min_Date;

Run;

*/

Data Work.Quarters;

Column Year Type = "INTEGER";

Column Quarter Type ="INTEGER";

Column Quarter_Number Type = "INTEGER";

Column Year_Number Type = "INTEGER";

Column Quarter_Begin_Date Type = "DATE";

Do While DateDiff("QUARTER", %Date, %Min_Date) <= 0

Year = Year(%Min_Date);

Quarter = Quarter(%Min_Date);

Quarter_Number = Datediff("QUARTER", %Date, %Min_Date);

Year_Number = DateDiff("YEAR", %Date, %Min_Date);

Quarter_Begin_Date = QuarterBegDate(%Min_Date);

%Let Min_Date = DateAdd("QUARTER", 1, %Min_Date);

Output;

Loop;

Run;

Page 136 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.5.4. Comments
The entire set of columns coming together with the quarterly positions is very useful
when filtering the tables in reports/documents.

4.8.6. DMY() - MDY() - FORMAT()

4.8.6.1. Goal
Display a date.

4.8.6.2. Features being illustrated

• Functions - date

4.8.6.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\EFRONT_SUP.2(Private)\TEST\EXAMPLES\TablesFormation";

/*Create the table that receives dates and values*/

DATA TEST.WRITING_DATES;

COLUMN X_DATE_DAY LABEL="Day";

COLUMN X_DATE_MONTH LABEL="Month";

COLUMN X_DATE_YEAR LABEL="Year";

COLUMN X_DATE_DMY LABEL="DMY";

COLUMN X_DATE_MDY LABEL="MDY";

X_DATE_DAY = DAY(TODAY());

X_DATE_MONTH = MONTH(TODAY());

X_DATE_YEAR = YEAR(TODAY());

Page 137 of 169


eFront Report User Guide - V21.0 June 21, 2023

X_DATE_DMY = FORMAT(DMY(X_DATE_DAY,X_DATE_MONTH,X_DATE_YEAR),
"d/M/yyyy");

X_DATE_MDY = FORMAT(MDY(X_DATE_MONTH,X_DATE_DAY,X_DATE_YEAR),
"M/d/yyyy");

OUTPUT;

RUN;

PROC PRINT DATA = TEST.WRITING_DATES LABEL NOOBS;

RUN;

4.8.7. FILENAME() - FILE()

4.8.7.1. Goal
Insert images that have been uploaded to the application's database into an EXCEL
report.

4.8.7.2. Features being illustrated


• Functions - files and folders
• IF...THEN...ELSE control
• EF_IMG()

4.8.7.3. Program
//Build the table that receives the uploaded image file

DATA WORK.report;

COLUMN I TYPE=INTEGER;

COLUMN LOGO WIDTH=450;

//Search for the file CMYKlogo.jpg

FOR I = 1 TO FILES("\\Shared region(company)\VAL")

Page 138 of 169


eFront Report User Guide - V21.0 June 21, 2023

IF UPCASE(FILENAME(I)) = "CMYKLOGO.JPG" THEN

LOGO = FILE(I);

END;

NEXT;

// If the picture we are looking for doesn't exist then take the file empty.jpg

IF LEN(LOGO) = 0 THEN

FOR I = 1 TO FILES("\\Shared region(company)\VAL")

IF UPCASE(FILENAME(I)) = "EMPTY.JPG" THEN

LOGO = FILE(I);

END;

NEXT;

END;

OUTPUT;

RUN;

PROC PRINT DATA=WORK.REPORT;

RUN;

4.8.7.4. Comment

• The function FILES() only counts the files of the folder being identified, underlying
folders are not taken into account.
• Use the EF_IMG() macro to insert the image into the EXCEL report, ex:
EF_IMG("LOGO";C5:C6;"27";;;100")

Page 139 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.8. GETTEMPPATH()

4.8.8.1. Goal
Create a CSV file on the server (from an eFront Report table, and display a link in HTML
output to download this file.

4.8.8.2. Features being illustrated


• Functions - special
• PROC EXPORT step
• %LET statement

4.8.8.3. Program
//Build a temporary table

DATA WORK.TMP;

COLUMN NB TYPE=FLOAT;

COLUMN NAME TYPE=STRING;

//Instantiate the table

NB = 1.3456;

NAME = "xdrdgj";

OUTPUT;

RUN;

PROC PRINT DATA=WORK.TMP;

RUN;

//Create a macro-variable for access path to the CSV table

%LETFILE = GETTEMPPATH() & "\test.csv";

//Export the temporary data table and create an CSV file on the server

Page 140 of 169


eFront Report User Guide - V21.0 June 21, 2023

PROC EXPORT DATA=WORK.TMP DROP NOERROR FILE=%FILE NOHEADER


SEMICOLUMN;

RUN;

4.8.8.4. Comment
• Through the use of PROC EXPORT, the application generates a .CVS file from the
temporary data table. Semicolons are used as separators. The export file doesn't
integrate the column header from the source data table.

4.8.9. GETUSERID()_GETUSERINFO()

4.8.9.1. Goal
Retrieve information about the current user of the application.

4.8.9.2. Features being illustrated


• Functions - special

4.8.9.3. Program
// USERNUMBER => Unique number that is assigned to the current user

%LET USERID_1 = GetUserID();

// USERID => Login

%LET USERID = GetUserInfo(GetUserID(),"USERID1");

// USER => First Name and Last Name

%LET USER = GetUserInfo(GetUserID(),"FIRSTNAME1")& " " &


GetUserInfo(GetUserID(),"LASTNAME1");

//User => Country

%LET USER_COUNTRY = GetUserInfo(GETUSERID(),"COUNTRY1");

PROC PRINT;

Page 141 of 169


eFront Report User Guide - V21.0 June 21, 2023

PUT "Userid_1: " & %USERID_1;

PUT "Userid: " & %USERID;

PUT "User: " & %USER;

PUT "User country: " & %USER_COUNTRY;

RUN;

4.8.9.4. Available fields


List of meaningful fields that can be passed as <field_name>:

• IQID1 - User IQID


• USERID1 - User ID
• LASTNAME1 - User Lastname
• FIRSTNAME1 - User Firstname
• MAILID1 - First part of mail address (before @)
• MAILNAME1 - User mail name
• USERPROFILE - IQID of current user profile
• USERLIBPROFILE - Current profile label
• EMAIL1 - User full email
• ACCOUNT1 - IQID of user account
• PHONE1 - User phone number
• MOBILE1 - User mobile phone number
• ADDRESS11 - User address 1

4.8.9.5. Comment
• In EXCEL, use =EF_MACRO("USER") to print the user.

4.8.10. LOOKUP()_LOOKUPCODE()

4.8.10.1. Goal
Get the code and the label of options being part of the options list which is associated
with an additional field

Page 142 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.10.2. Features being illustrated

• Functions - special

4.8.10.3. Prerequisite
The LOOKUP() and LOOKUPCODE() functions apply specifically to the list of options
being available for additional fields. Therefore you can only use this function if additional
fields have been defined, and if a list of options has been defined for the additional field
you refer to, such as shown below:

1. Add an additional field


2. Define the list of options for the additional field

4.8.10.4. Program
//Define the micro variables that held the reference to a particular option being
associated to the additional field

%LET InstrLabel1 = LOOKUP("VCINVESTMENTINS.USERTEXT16", 1);

%LET InstrCode1 = LOOKUPCODE("VCINVESTMENTINS.USERTEXT16", "Equity");

%LET InstrLabel2 = LOOKUP("VCINVESTMENTINS.USERTEXT16", 2);

%LET InstrCode2 = LOOKUPCODE("VCINVESTMENTINS.USERTEXT16", "Quasi


equity");

PROC PRINT;

PUT %InstrLabel1;

PUT %InstrCode2;

PUT %InstrLabel1;

PUT %InstrCode2;

RUN;

Page 143 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.8.10.5. Result
Equity1

Quasi equity2

4.8.11. PROC SORT - (WHERE - NOT...IN)

4.8.11.1. Goal
Sort a table using an exclusive condition.

4.8.11.2. Features being illustrated


• Operators

4.8.11.3. Program
//Display the result

PROC SORT DATA=T_PORTFOLIO (WHERE NOT COMP IN("Cash & other


assets","Carry","Leverage")) OUT=T_TO_HOLDINGS;

BY DESCENDING XCURVALUATION;

RUN;

4.8.12. ROUND()_CINT()

4.8.12.1. Goal
Two methods of round numbers

4.8.12.2. Features being illustrated


• Functions - numbers

4.8.12.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\EFRONT_SUP.2(Private)\TEST\EXAMPLES\TablesFormation";

Page 144 of 169


eFront Report User Guide - V21.0 June 21, 2023

/*Create the table that receives date formats*/

DATA TEST.ROUNDED_VALUE;

COLUMN MyVALUE TYPE=FLOAT;

COLUMN UseRound;

COLUMN UseInteger;

Myvalue = 235.21573;

UseRound = ROUND(MyValue,2);

UseInteger = CINT(MyValue);

OUTPUT;

Myvalue = 1.4;

UseRound = ROUND(MyValue,0);

UseInteger = CINT(MyValue);

OUTPUT;

Myvalue = 1.6;

UseRound = ROUND(MyValue,0);

UseInteger = CINT(MyValue);

OUTPUT;

Myvalue = 1.6;

UseRound = ROUND(MyValue-0.5,0);

UseInteger = CINT(MyValue);

OUTPUT;

Page 145 of 169


eFront Report User Guide - V21.0 June 21, 2023

RUN;

PROC PRINT DATA=TEST.ROUNDED_VALUE;

RUN;

4.8.13. WEEKDAY()

4.8.13.1. Goal
Calculate the number of business days prior to a certain date (STARTDATE) to trigger
an alert?

4.8.13.2. Features being illustrated


• Functions - date
• Functions - numbers

4.8.13.3. Comment
• WEEKDAY function in eFront Script returns Monday 1, whereas EXCEL returns
Sunday 1!
• We use the ceiling function to help work out the remainder (in Excel we can use the
MOD function which does not exist in Front Script).

4.8.13.4. Program
LIBNAME USER ".";

%PARAM STARTDATE TYPE=DATE LABEL="Starting from " NOTNULL;

%PARAM DAYSTOADD TYPE=INTEGER LABEL="Business days" NOTNULL;

//Code to create the same result as the MOD function in Excel (to get the remainder
when dividing by 5 since there are 5 business days in a week)

%LET MODDAYSTOADD=%DAYSTOADD-(5*CEILING(%DAYSTOADD/5));

TRACE %MODDAYSTOADD;

Page 146 of 169


eFront Report User Guide - V21.0 June 21, 2023

//Calculate the correction to move past the weekend if necessary as a result of the
remainder days (derived above)

%IF (WEEKDAY(%STARTDATE)+%MODDAYSTOADD)>5 %THEN

%LET CORRECTION=2;

%ELSE %LET CORRECTION=0; %END;

// Derive the new date from the original, plus the number of weeks plus the correction

%LET NEWDATE=CDATE(%MODDAYSTOADD+
%STARTDATE+(7*CEILING(%DAYSTOADD/5))+%CORRECTION);

// Trace the result

TRACE %NEWDATE;

// This might be useful since you can easily use positive or negative "DAYSTOADD" and
therefore move backwards and forwards at will.

4.8.14. YMD()

4.8.14.1. Goal
Convert an integer into a date and vice versa

4.8.14.2. Features being illustrated


• Functions - date

4.8.14.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\EFRONT_SUP.2(Private)\TEST\EXAMPLES\TablesFormation";

/*Create the table that receives the integer*/

DATA TEST.T_test_date;

COLUMN CYEAR TYPE=INTEGER;

Page 147 of 169


eFront Report User Guide - V21.0 June 21, 2023

CYEAR = "2007";

OUTPUT;

RUN;

/*Convert the integer into a date*/

DATA TEST.T_test_date;

SET TEST.T_test_date;

COLUMN REAL_DATE TYPE=DATE;

REAL_DATE = YMD(CYEAR,12,31);

OUTPUT;

RUN;

//Display the result

PROC PRINT DATA=TEST.T_test_date LABEL NOOBS;

RUN;

4.8.15. YMD() - FORMAT()

4.8.15.1. Goal
Apply different formats to a date.

4.8.15.2. Features being illustrated


• Functions - date

4.8.15.3. Program
//Create the alias that points the existing table location

LIBNAME TEST "\\EFRONT_SUP.2(Private)\TEST\EXAMPLES\TablesFormation";

Page 148 of 169


eFront Report User Guide - V21.0 June 21, 2023

/*Create the table that receives date formats*/

DATA TEST.DATE_FORMATS;

COLUMN X_DATE TYPE=DATE LABEL="Initial Format" WIDTH=140;

COLUMN X_STR LABEL="Day - Month - Year" WIDTH=140;

COLUMN X_STR_US LABEL="Month - Day - Year" WIDTH=140;

X_DATE = ymd(2001, 2, 3); // store the date 2001-02-03

X_STR = format(X_DATE, "d/M/yyyy");

X_STR_US = format(X_DATE, "M/d/yyyy");

OUTPUT;

RUN;

//Display the result

PROC PRINT DATA=TEST.DATE_FORMATS LABEL NOOBS;

RUN;

Page 149 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.9. Data entry forms, and reference information

Find in the detailed description of a collection of data entry forms, and input parameter
informats:

• Parameter Informats
• The Filters Form
• The Group By Form

Column Description
Group by Identifies the column for which to calculate statistics
Name Identifies the column
Renamed as Defines a new column name
Total Selects a function [N, Total(), Average(), MAX(), MIN(), IRR(), Multiple()] that can be
applied to column values. When you use the IRR() function, you have to select a DATE
type column from the Parameter drop-down list. For details about how to use these
functions, refer to the eFront Script Reference Guide.
Parameter The Parameter drop-down list presents all the table columns whose type = DATE. You
have to select a column from the Parameter drop-down list, when applying the IRR()
function to a column.
Label Defines the column title to display in a report
Format Identifies the format to be applied to resulting values. For details about formats, refer to
the eFront Script Reference Guide.
• The Listing Form
• The Parameters Form
• The Report Settings Form
• The SQL Query Form

4.9.1. Parameter Informats


There are two types of informats:

• Informats that return a single value


• Informats that return a list of values (informat keywords start with an "X").

Informats that return a list of values cannot be used:

• Together with IN expressions.

Page 150 of 169


eFront Report User Guide - V21.0 June 21, 2023

• Together with a PUT statement in a PROC PRINT step.

Always use Capital letters! If you don't, you may experience issues when moving to
eFront Invest.

Option Description Example


INFORMAT= "?? Returns 1 ID corresponding to INFORMAT="??ID(VCFUND)"
ID(<data_table>)" the value being chosen in the
<data_table> Displays all the funds contained in
the VCFUND table, and returns the
ID of the fund being chosen.
INFORMAT= "?? Returns an ID list corresponding
XID(<data_table>)" of the values being chosen in the
<data_table>
INFORMAT= "?? Displays a scrolling list, and INFORMAT="??
CHOICE(<value_1>, returns the <value> being chosen. CHOICE(AX,OF,BF,RV,PVI)"
<value_n>)"
Displays a scrolling list composed
of 5 elements, and returns the
value being chosen.

You can use the ??CHOICE option


to create a launch parameter
based on year instead of date:

INFORMAT="??CHOICE(2006,
2007, 2008, 2009, 2010)"
INFORMAT= "?? Displays a scrolling list, and %PARAM CHOICE LABEL="Test
CHOICE(<id_1>=<value_1>, returns the <id> corresponding to Choice" INFORMAT="??
<id_n>=<value_n>)" the value being chosen. CHOICE(VAL1=Valeur
1,VAL2=Valeur 2)";

Page 151 of 169


eFront Report User Guide - V21.0 June 21, 2023

INFORMAT= "?? Displays a list with checkboxes %Param XCHOICE


XCHOICE(<id_1>=<value_1 and allows users to choose several label="Test XChoice" informat="??
>, <id_n>=<value_n>)" values. XCHOICE(VAL1=Valeur
1,VAL2=Valeur 2)";

You can also use the DEFAULT


option to define values that are
checked by default:

%PARAM XCHOICE

LABEL = "Fruit"

INFORMAT = "??
XCHOICE(1=Apple,2=Orange,3=P
ear,4=Strawberry,5=Raspberry)"
DEFAULT="1,3";
INFORMAT= "?? Returns the position of the values
CHECK(<selection_1>, being chosen.
<selection_n>, All)"
INFORMAT= "?? Displays a scrolling list of all the INFORMAT="??
PICKID(<data_table>; <col_name> values, and returns PICKID(VCFUND;FUND)";
<col_name>)" the ID of the value being chosen.
Displays all the funds, and returns
the ID of the fund being chosen.
INFORMAT= "?? Displays a scrolling list of all the INFORMAT="??
PICKID(<data_table>; <col_name> values, and returns PICKID(VCFUND;FUND;FSTATUS
<col_name>;<expression>)" the ID of the value being chosen. =0)";

Displays all the funds with the


FStatus set to zero, and returns
the ID of the fund being chosen.
INFORMAT= "?? Displays a scrolling list of all the
PICKID(<SQL query>)" values returned by the SQL query,
and returns the ID of the value
being chosen.
INFORMAT= "?? ??FILTER used together with the Refer to example:
PICKID(<SQL query <SQL-query> passed to the ??
WHERE (??FILTER)>)" PICKID keyword allows to filter the %PARAM - ??PICKID(SQL- query)
<data_table> according to the user - ??FILTER
region.
INFORMAT= "?? Displays a scrolling list of all the
XPICKID(<data_table>; <col_name> values, and returns
<col_name>)" the list of IDs of the values being
chosen.

Page 152 of 169


eFront Report User Guide - V21.0 June 21, 2023

INFORMAT= "?? Displays a list of all the values


XPICKID(<SQL-query>)" returned by the SQL query, and
returns the list of ID's of the values
being chosen.
INFORMAT= "?? ??FILTER used together with the Refer to example:
XPICKID(<SQL-query <SQL-query> passed to the ??
WHERE (??FILTER)>)" XPICKID keyword allows to filter %PARAM - ??XPICKID with SQL
the <data_table> according to the query
or user region.

INFORMAT= "?? You cannot apply default values to


XPICKID(<SQL-query this parameter!
WHERE {FILTER}>)"
INFORMAT= "?? You can link two %PARAM Refer to examples:
XPICKID(<SQL-query (?)>; statements, and use the value(s)
{<var>})" returned by the first one to define %PARAM - ??PICKID_{VAR}
the data selection to be presented
INFORMAT= "?? %PARAM - ??XPICKID - (?) - (?)
to the user by the second one.
XPICKID(<SQL-query (?)
(?)>;{<var>};{<var>})" This is only possible with ??
XPICKID!
INFORMAT= "?? Applies to standard reference INFORMAT="??
LOOKUPCODE(<reference_ tables, and user defined reference LOOKUPCODE(VCINVESTINSCL
table>)" tables. Reference tables contain AS)";
the list of options that are
or associated with standard fields. Returns the code being
User defined reference tables associated to one of the
INFORMAT= "?? options of the reference table
contain the list of options that are
LOOKUPCODE(<reference_ VCINVESTINSCLAS
associated with additional fields.
table>.<additional_field)"
??LOOKUPCODE displays a
scrolling list of the options
contained in the <reference_table>
and returns the code of the option
selected.

Page 153 of 169


eFront Report User Guide - V21.0 June 21, 2023

INFORMAT= "?? Applies to standard reference Refer to exemple:


LOOKUP(<reference_table>) tables, and user defined reference
" tables. Reference tables contain %PARAM - ??LOOKUP - ??
the list of options that are XLOOKUPCODE
or associated with standard fields.
User defined reference tables
INFORMAT= "?? contain the list of options that are
LOOKUP(<reference_table>. associated with additional fields.
<additional_field)"
??LOOKUP displays a scrolling list
of the options contained in the
<reference_table> and returns the
description (label) of the option
selected.
INFORMAT= "?? Applies to standard reference Refer to exemple:
XLOOKUPCODE(<reference tables, and user defined reference
_table>)" tables. Reference tables contain %PARAM - ??LOOKUP - ??
the list of options that are XLOOKUPCODE
or associated with standard fields.
User defined reference tables
INFORMAT= "?? contain the list of options that are
XLOOKUPCODE(<reference associated with additional fields.
_table>.<additional_field)"
??XLOOKUPCODE displays the
list of the options contained in the
<reference_table> and returns the
codes of the options selected.
INFORMAT= "?? Applies to standard reference Refer to exemple:
XLOOKUP(<reference_table tables, and user defined reference
>)" tables. Reference tables contain %PARAM - ??LOOKUP - ??
the list of options that are XLOOKUPCODE
or associated with standard fields.
User defined reference tables
INFORMAT= "?? contain the list of options that are
XLOOKUP(<reference_table associated with additional fields.
>.<additional_field)"
??XLOOKUP displays the list
of the options contained in the
<reference_table> and returns the
descriptions (labels) of the options
selected.

You cannot apply default values to


this parameter!

Informats can only be used together with application owned data tables (principal
tables). The most current application owned tables are:

Page 154 of 169


eFront Report User Guide - V21.0 June 21, 2023

Table name Description


VCACCTCAT
VCBANKACCOUNT returns the list of bank accounts being entered in the database
VCBENCHMARK
VCFUND returns the list of the funds being invested in, and investing funds
VCFUNDOP returns the list of fund operations
VCFUNDOTHER
VCFUNDSHARE returns the list of fund shares
VCINVESTMENT returns the global investment for an investor
VCINVESTMENTINS returns the details of investments for an investor in an instrument; list of
investment instruments
VCINVESTMENTOP returns the list of operations linked to investment instruments
VCINVESTCLASS returns the list of security classes being entered in the database
VCINVESTOPTYPE
VCINSTRCONVRATE
VDFUNDINVPOLICY returns text items that express the investment policy
VCNOTE returns the list of all notes being entered in the database
VCPUBLICINFO
VCPUBLICMARKET
VCSHAREHOLDCAT List of investor categories
VCSHAREHOLDTYPE List of investor types
VCSUBSCRIBER returns the list of fund subscribers
VCSUBSCRIBERFUNDOP returns the details of a fund operation for a subscriber
VCSUBSCRVEHICUL returns the list of major vehicles being used for fund subscription
VCSTAGE List of investment stages
SFAACCOUNT returns the list investing companies
SFAACCTINFOS returns the list of company key information
SFAADDRESS
SFACONTACT returns the list of investing contacts

4.9.2. The Filters Form


Column Description
Encloses the expression within parenthesis

Page 155 of 169


eFront Report User Guide - V21.0 June 21, 2023

Name Identifies the column to be filtered. Tick the Display Name box at the bottom of the Filters'
section to display column names, and untick the Display Name box to display column labels.
Order Defines the sort option (Ascending or Descending), that applies to the column being
selected.
Operator Defines the operator to be included in the data filter expression. Possible operators are:

<>

<

>

>=

<=

IS NULL

IS NOT NULL

LIKE

NOT LIKE

IN

NOT IN

MOD

BETWEEN(,)

NOT BETWEEN(,)
Criteria Defines the parameter needed to use the operator
Encloses the expression within parenthesis

Log. operator Identifies the logical operator to be used when combining several filters

4.9.3. The Group By Form

Column Description
Group by Identifies the column for which to calculate statistics
Name Identifies the column
Renamed as Defines a new column name

Page 156 of 169


eFront Report User Guide - V21.0 June 21, 2023

Total Selects a function [N, Total(), Average(), MAX(), MIN(), IRR(), Multiple()] that can be applied
to column values. When you use the IRR() function, you have to select a DATE type column
from the Parameter drop-down list. For details about how to use these functions, refer to the
eFront Script Reference Guide.
Parameter The Parameter drop-down list presents all the table columns whose type = DATE. You have
to select a column from the Parameter drop-down list, when applying the IRR() function to a
column.
Label Defines the column title to display in a report
Format Identifies the format to be applied to resulting values. For details about formats, refer to the
eFront Script Reference Guide.

4.9.4. The Listing Form


Display Column Descrliption
option
Columns Selects the line for a group deletion

Inserts a line above the current line

Deletes the line

Name Identifies the column


Group by Identifies the column to be used when grouping information
Sort Column sort option (Ascending or Descending)
Total Selects a function [Total(), Average(), IRR(), Multiple()] that can be applied
to column values. When you use the IRR() function, you have to select a
DATE type column from the Parameter drop-down list. For details about
how to use these functions, refer to the eFront Script Reference Guide.
Parameter The Parameter drop-down list presents all the table columns whose type
= DATE. You have to select a column from the Parameter drop-down list,
when applying the IRR() function to a column.
Display Identifies the column to be displayed in the listing display.
Column header Defines the label to be displayed as column title
Criteria Selects the line for a group deletion

Inserts a line above the current line

Deletes the line

Name Identifies the column

Page 157 of 169


eFront Report User Guide - V21.0 June 21, 2023

Group by Identifies the column to be used when grouping information


Display Identifies the column to be included in the listing display
Operator Defines the operator to be used to specify value selection criteria
Criteria Defines the criteria to select a value
Log. operator Identifies the logical operator to be used when combining several criteria
Formats Selects the line for a group deletion

Inserts a line above the current line

Deletes the line

Name Identifies the column


Group by Identifies the column to be used when grouping information
Display Identifies the column to be included in the listing display
Labels Defines the labels to be used for Group headers, Column headers and N.
observation. If you define labels, eFront Script displays by default these
labels.
Format Identifies the format to be applied to the column values. For details about
formats, refer to the eFront Script Reference Guide.
Styles Defines styles to apply to the various listing elements.

4.9.5. The Parameters Form


Column Descrliption
Name Identifies the name of the variable that stores the user input
Caption Specifies the text to display when asking for user input
Type Identifies the type of data required. Type = String | Integer | Float | Boolean | Date. If Type =
DATE, the user can select a date from a pop-up calendar.
Not null If checked, a value is required.
Informat Identifies a list of default values to display for interactive user input choice. The user can
choose one or more values. The informat allows you to specify which information to offer
to the user, how to offer it, and how to get the selection back. Refer to the list of available
informats.
Default Identifies a default value to display for interactive user input choice. value: static
value value or a dynamic value (being calculated using a function). Example: TYPE= "DATE"
DEFAULT=TODAY

Page 158 of 169


eFront Report User Guide - V21.0 June 21, 2023

4.9.6. The Report Settings Form


Display Column Descrliption
option
Criteria Stylesheet Name of the stylesheet to be applied. You only need to specify the
stylesheet name, if you use more than one stylesheets. The stylesheet
name is not the name of the stylesheet object, but the name mentioned in
the stylesheet step! For details, refer to the Apply a stylesheet to a report
Banner To include a banner (image) in the listing, define the image name and
access path in the Banner field.
Report title Title of report
Report subtitle Subtitle of report
Nb. observations Label to be displayed referring to the total of column lines
label
Main styles Defines the styles to be applied to the main report elements (group
header, Nb. observations, Column header, Data, Group total, Grand total).
If you attach a stylesheet to the report, you don't need to define the main
styles. If you are neither satisfied with the settings in the stylesheet being
attached nor with the default styles being applied, define the main styles,
and override existing style settings. Low-level style definitions always
override high-level style definitions.
Include Includes an eFront Script object, such as a stylesheet. Specify the file
name and the access path

4.9.7. The SQL Query Form


Display Column Descrliption
option
View main Selects the line for a group deletion
parameters
Marks the line for a group deletion

Deletes the line


Column Defines the column to be included in the SQL query
Raw data Presents raw data
Expression Allows to develop a complex query. If you use an expression in a query,
eFront Script assumes that the result by default is a string. If not, you must
override the Type, and select the appropriate data type.
Name Name of column. Allows to specify codes when exporting data
automatically to EXCEL or WORD.
Type Type of column value

Page 159 of 169


eFront Report User Guide - V21.0 June 21, 2023

Caption Defines the label to display as column title


Sort Column sort option (Ascending or Descending)
Format Format that applies to column content. For more details about column
formats, refer to Defining formats.
View criteria Selects the line for a group deletion

Marks the line for a group deletion

Deletes the line


Column Defines the column to be included in the SQL query
Raw data Presents raw data
Expression Allows to develop a complex query. If you use an expression in a query,
eFront Script assumes that the result by default is a string. If not, you must
override the Type, and select the appropriate data type.
Type Type of column value
Operator Defines the operator to be used to specify value selection criteria
Criteria Defines the criteria to select a value. For more details, click the "Help on
criteria" button.

Page 160 of 169


eFront Report User Guide - V21.0 June 21, 2023

5. Launching & updating reports

Page 161 of 169


eFront Report User Guide - V21.0 June 21, 2023

5.1. Useful procedures

There are different ways of launching and updating reports:

• Launch a report from desktop vignette


• Launch a report from within eFront Report
• Schedule report execution
• Launch a report using eFront CMD

Page 162 of 169


eFront Report User Guide - V21.0 June 21, 2023

5.2. Launch a report from desktop widget

You can populate the desktop of your application with so-called widgets. The available
widgets are as follows:

• Last Opened by Me,


• Process,
• Tasks,
• Explorer,
• Tile,
• Documents,
• FrontReports,
• Dashboards,
• Submissions,
• Custom Content.

Provided an administrator user has added and configured the FrontReports widget, you
are able to launch reports from your homepage by clicking the report name hyperlink.
The icon in front of the report name indicates the type of given report.

For information about configuring the FrontReports widget, see the document eFront
Invest - First Steps (General Usage) - V21.0 Solstice.

Page 163 of 169


eFront Report User Guide - V21.0 June 21, 2023

5.3. Launch a report from within eFront Report

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
3. Click Compile, then Execute to run the report.
The system executes all the templates linked to the current document, and makes
all the templates available for download.
All the executed reports are stored in the Attachments section of the document.
4. (Optional) To view the automatically generated source code, open the Source tab.

Page 164 of 169


eFront Report User Guide - V21.0 June 21, 2023

5.4. Schedule report execution

When executing a document, eFront Report generates by default all the reports
attached to it. You can schedule the report generation, so that it executes automatically
at the desired schedule. Report generation can be programmed as recurrent event. You
have two methods of scheduling report execution:

• Use eFront CMD and the WINDOWS scheduler to schedule the task (more flexible).
• Use the Automatic Execution feature linked to the report.

In the following, we show you how to use the Automatic Execution feature:

1. From the main menu, click Open > Reports.


The Reports window opens.
2. Open a document.
The document editor opens.
3. Define target folder that will host generated reports:
a. Access the Options section.
b. Under Save in directory, specify the target folder.
c. Click Save & Close.
4. Define the schedule:
a. Right-click the document.
b. Click Properties.
The object properties manager displays.
c. Click on the chevron next to Object's properties, then select Tasks.
The task schedule page displays.
d. Enter task description.
e. Define the start date and time of the task.
f. Click Recurrence.
The Event recurrence window displays.
g. Define the recurrence of the task.
h. Click OK.
i. Click Add task.
The task is added to the task list.
j. Click Save.

Page 165 of 169


eFront Report User Guide - V21.0 June 21, 2023

5. To view the list of programmed tasks:


a. From the eFront menu, select My Settings.
b. Open the Background tasks tab.
All the programmed background tasks display.
The name of the background task is the same as the Description defined in
step 4D.

Page 166 of 169


eFront Report User Guide - V21.0 June 21, 2023

5.5. Launch a report using eFront CMD

Launching a report generation/update from a command line requires launching the


execution of the dedicated update program through a command line program. To
this purpose, eFront provides eFront CMD, a command line program that has been
specifically developed to manage program execution in a secured way (controlling
access rights to the program and the data being involved). The call from the command
line can be a manual operation or a scheduled background task.

For details about how to use eFront CMD, please refer to the document: Framework
- Interfacing with eFront Applications, which is available in our Documentation
Catalogue.

Page 167 of 169


eFront Report User Guide - V21.0 June 21, 2023

6. Configuring the eFront Report Package

1. From the main application menu, click Administration > Options.


The Options page displays.
2. Under Account, locate the PCKAJXREPORT package.
You may need to expand the package by clicking on the chevron next to the
package name.
3. Configure the package options.
For more information on the available options, see PCKAJXREPORT - parameters
(company level).

Page 168 of 169


eFront Report User Guide - V21.0 June 21, 2023

6.1. PCKAJXREPORT - parameters (company level)

6.1.1. PCKAJXREPORT (FrontReport)


Parameter Explanation
Standard 'Report' tab
Override My files
Blocking asynchronous recalc
Memory threshold Value : Integer (refers to seconds)

If memory consumption reaches this level, only one report is executed at a


time.

Example: 700
Timeout Value : Integer (refers to seconds)

When the memory threshold is reached, only one report is executed at a


time.

'Timeout' refers to the maximum period after which the system stops the
execution of one single report

Example: 3600
Show button to open standard
editions page
Save 2007 documents using If selected, documents created with Office 2007 templates (XLSX or
2003 format DOCX) are saved for download in Office 2003 format (XLS or DOC)
Use Excel IRR calculation If selected, uses the Excel calculation for IRRs.

If unselected, uses the eFront calculation method.


Do not fix Table Body's line If selected, the height of table body cells in not fixed and the text is
height wrapped (i.e. it displays in height of the cells increases if the string is long)
GIPS compliant IRR If selected, IRR calculated on a shorter period than one year are
annualized.

When the period is less than a year, the system will compute an IRR
based on the annual prorata.
Force Pivot Currency If defined, pivot currency will always be used to get FX rates.
Search for reports using When exporting/importing the desktop, reports within widgets are identified
names when search by ID fails by names and not by IQID.

Page 169 of 169

You might also like