Adding NetSuite Data to the Template File

To add NetSuite data to your HTML report template, use FreeMarker, a Java library used to generate text outputs based on templates and dynamic data. FreeMarker interpolations will enable you to include NetSuite content in the template. An interpolation is an expression, such as ${record.entity} which is replaced in the output with the actual value of the expression. For complete information about FreeMarker, see the FreeMarker documentation

Note:

We recommend to create the template file in a HTML/XML editor and to upload to the NetSuite File Cabinet (Documents > Files > File Cabinet). For more information about uploading files to File Cabinet, see Uploading Files to the File Cabinet.

Every template consists of a number of cells with IDs that you create yourself. Valid Cell ID must start with a letter (A-Z) and it must not contain white spaces. Also, it must only consist of alphabetic characters, numeric characters, or the underscore (_) symbol. Finally, it must be unique (you cannot have multiple variables with the same Cell ID in one report).

Note that to comply with the FreeMarker syntax rules, all variables in your template must be prefixed with the $ sign. Therefore, follow these conventions when adding different types of variables to your cells:

System variables

The system variables (starting with a prefix SYS) add various information to your report using data drawn from the NetSuite system. Unlike standard variables, you have to add them directly to your HTML/XML report template. Listed below are the system variables that can be used in reports created by this SuiteApp:

Name

ID

Description

Company Address

SYS.companyaddress

Information from Setup > Company > Company Information (Address field in Addresses subtab).

Company Name

SYS.companyname

Information from Setup > Company > Company Information (Company Name field).

Date and Time

SYS.datetime

SYS.date

SYS.time

Time and date when this report was generated. This time stamp can be adjusted in the Formatting section of the Set Preferences dialog (General subtab).

Format: decimal separator

SYS.formatdecseparator

The decimal separator. Either “.” or “,”.

Format: negative numbers

SYS.formatnegnumenum

The same as using the Negative Number Format dropdown list in the Formatting section of the Set Preferences dialog (General subtab).

Format: numbers

SYS.formatnumenum

The same as using the Number Format dropdown list in the Formatting section of the Set Preferences dialog (General subtab).

Format: thousands separator

SYS.formatthousseparator

The thousands separator. Either “.”, “,”, or “ “.

Show or Export

SYS.isexporting

Checking whether this report will be displayed in the Country-Specific Reports (value 0) dashboard or exported (value 1). For exported reports, the template will be adjusted to improve exported report’s appearance.

OneWorld

SYS.isow

Checking whether this is a OneWorld account.

User Name

SYS.username

Name of the user who displayed this report (in a format “FirstName MiddleName(s) Surname”.

Subsidiary Address

SYS.subsidiaryaddress

Available only if Subsidiary filter is present on this report. Information about selected subsidiary selected subsidiary is displayed (Parent company, inactive, consolidated, specific subsidiary).

Currency Symbol

SYS.currencysymbol

Displays the currency symbol. For example: €.

Currency Code

SYS.currencycode

Displays the currency code. For example: EUR.

Note:

When you open a report containing a system variable that is not available, this variable will be highlighted in red. You should consider deleting it from your report.

Filter variables

The filter variables contain information about filters currently selected in the report. This is particularly important in exported files, because the data that they contain depend on selected filters. Unlike standard variables, you have to add them directly to your HTML/XML report template. Listed below are the filter variables that can be used in reports created by this SuiteApp:

Name

ID

Description

Accounting Book

FLT.accountingbook

Displays the value selected in the Accounting Book filter.

Period From

FLT.periodfrom

Displays the value selected in the Period From filter.

Period To

FLT.periodto

Displays the value selected in the Period To filter.

Comparative Period From

FLT.periodfrom2

If you use the comparative column in your report, this filter will display the value selected in the Period From filter minus one year.

Comparative Period To

FLT.periodto2

If you use the comparative column in your report, this filter will display the value selected in the Period To filter minus one year.

Subsidiary Context

FLT.subsidiary

Displays the value selected in the Subsidiary Context filter.

Note:

When you open a report containing a filter variable that is not available (the filter that it refers to is not present on this report), this variable will be highlighted in red. You should consider deleting it from your report.

To learn more about filters in the Country-Specific Reports SuiteApp, see Filters.

Related Topics

Country-Specific Reports Overview
Enabling Required Features the Country-Specific Reports SuiteApp
Installing the Country-Specific Reports SuiteApp
Creating a Template for the Country-Specific Reports SuiteApp
Using the Country-Specific Reports SuiteApp
Adding and Editing Report Elements
Working with Reports
Roles and Permissions

General Notices