Overview
Version
Report Server Version | Plugin Version | Functional Change |
---|---|---|
11.0 | V1.0 | / |
V1.2 | Added the TODATEPRO function, which can return the Gregorian calendar date corresponding to the current date. | |
V1.3 | Partially adapted to multiple languages. | |
V1.4 | Added holiday functions and Thai currency functions. |
Function Description
The current preset functions in FineReport cannot well deal with actual usage scenarios in global markets. The localized function collection is added to make the product's internationalization instances more comprehensive and complete. The following figure shows the effect.
Plugin Installation
Download the Localized Function Collection plugin.
For details about how to install the plugin in the designer, see Designer Plugin Management.
For details about how to install the plugin on the decision-making platform, see Server Plugin Management.
Function Description

ZHMONEY
ZHMONEY can be used to specify the returned capitalized Chinese amount (same function as CNMONEY) displayed in simplified Chinese or traditional Chinese. The following table introduces the function in detail.
Function Name | |
ZHMONEY(number, unit, locale) | |
Parameter | Description |
number | Mandatory. Same as number in CNMONEY. The number to be converted must be of the numeric type. |
unit | Optional. Same as unit in CNMONEY. The unit needs to be entered here. The units "s","b","q","w","sw","bw","qw","y","sy","by","qy", and "wy" respectively represent “拾”, “佰”, “仟”, “萬”, “拾萬”, “佰萬”, “仟萬”, “億”, “拾億”, “佰億”, “仟億”, and “萬億”. ![]() The unit can be left empty. If it is left empty, the number is directly converted to capitalized Chinese amounts. Otherwise, the number is multiplied with the unit's base number and then the product is converted to capitalized Chinese amounts. |
locale | Optional. locale specifies a language. For example, "zh" represents "Simplified Chinese" and "zh_TW" represents "Traditional Chinese". ![]() locale can be set to only "zh" or "zh_TW", or just left empty. If locale is left empty:
|
Returned Value | |
If locale is set to "zh_TW", capitalized amounts in Traditional Chinese are returned. Example: ZHMONEY(1234567890000.31) returns 壹万贰仟叁佰肆拾伍亿陆仟柒佰捌拾玖万圆叁角壹分. ZHMONEY(3.4567,"wy", "zh_TW") returns 叁兆肆仟伍佰陸拾柒億圓整. |
ZHLUNAR
ZHLUNAR can be used to specify the returned lunar date corresponding to the current date (same function as LUNAR) in Simplified Chinese or Traditional Chinese. The following table introduces the function in detail.
Function Name | |
ZHLUNAR(year, month, day, locale) | |
Parameter | Description |
year | Year. Mandatory. Same as year in LUNAR. |
month | Month. Mandatory. Same as month in LUNAR. |
day | Day. Mandatory. Same as day in LUNAR. |
locale | Optional. locale specifies a language. For example, "zh" represents "Simplified Chinese" and "zh_TW" represents "Traditional Chinese". ![]() locale can be set to only "zh" or "zh_TW", or just left empty. If locale is left empty:
|
Returned Value | |
If locale is set to "zh_TW", the lunar date in Traditional Chinese is returned. Otherwise, the lunar date in Simplified Chinese is returned. Example: ZHLUNAR(2020, 6, 4) returns 庚子年闰四月十三. ZHLUNAR(2020, 6, 4, "zh_TW") returns 庚子年閏四月十三. |
DATEFORMAT
The DATAFORMAT function can be used to convert a date to a string according to the pattern, locale, and chronology. The following table introduces the function in detail.
Function Name | |
DATEFORMAT(date, pattern, locale, chronology) | |
Parameter | Introduction |
date | Mandatory. This parameter specifies a date which can be obtained through the DATE and TIME functions in FineReport. |
pattern | Mandatory. This parameter specifies the date style after formatting. Example: GGGGYYYY-MM-dd, EEEE, hh:mm:ssa Reference: https://help.gooddata.com/cloudconnect/manual/date-and-time-format.html |
locale | Optional. locale specifies a language. Example: "zh" represents "Simplified Chinese", "zh_TW" represents "Traditional Chinese", "en_US" represents "English", and "ja_JP" represents "Japanese". ![]() |
chronology | Optional. This parameter specifies a calendar. "J" represents the Japanese era calendar, "m" represents the Republic of China calendar, and "t" represents the Thai Buddhist calendar. ![]() |
Returned Value | |
DATEFORMAT(TODAY(), "YYYY-MM-dd HH:mm:ss") returns 2021-11-08 00:00:00. DATEFORMAT(TODAY(), "YYYY-MM-dd, EEEE", "zh_TW") returns 2021-11-08, 星期一. DATEFORMAT(TODAY(), "YYYY-MM-dd, EEEE", "en_US") returns 2021-11-08, Monday. DATEFORMAT(TODAY(), "GGGGyy-MM-dd, EEEE", "ja_JP", "j") returns 令和03-11-08, 月曜日. ![]() DATEFORMAT(TODAY(), "GGyyy-MM-dd, EEEE", "zh_TW", "m") returns 民國110-11-08, 星期一. |
TODATEPRO
The TODATEPRO function can be used to convert the dates in the Republic of China calendar, Japanese era calendar, and Thai Buddhist calendar into the dates in the yyyy-MM-dd format and the Gregorian date format. The following table introduces the function in detail.
Function Name | |
TODATEPRO(date, pattern, chronology, locale) | |
Parameter | Description |
date | Mandatory. This parameter specifies the date object (in the string format) to be converted. |
pattern | This parameter specifies the date format of the original date object. |
chronology | Optional. This parameter specifies a calendar. "J" represents the Japanese era calendar, "m" represents the Republic of China calendar, and "t" represents the Thai Buddhist calendar. |
locale | Optional. locale specifies a language. Example: "zh" represents "Simplified Chinese", "zh_TW" represents "Traditional Chinese", "en_US" represents "English", and "ja_JP" represents "Japanese". ![]() locale can be left empty. If it is left empty, the system language is used as the parameter value by default. |
Returned Value | |
TODATEPRO("民國111-07-01", "GGyyy-MM-dd", "m", "zh_TW") returns 2022-07-01. TODATEPRO("平成21年12月01日, 火曜日", "Gy年MM月dd日, EEEE", "j", "ja_JP") returns 2009-12-01. TODATEPRO("2566/09/21", "yyyy/MM/dd", "t") returns 2023-09-21. |
BAHTTEXT/BAHTONLY
BAHTTEXT and BAHTONLY functions can be used to convert numbers into Thai currency texts.
Function Name | BAHTTEXT(number) | BAHTONLY(number) |
number | Mandatory. The number to be converted must be of the numeric type. | |
Difference | This function is used to convert a number to a Thai text suffixed with ถ้วน. | This function is used to convert a number to a Thai text suffixed with ถ้วน. But this function processes only the integer part (ignoring decimals). |
Example | (1) Example for converting an integer to a Thai text (suffixed with ถ้วน) BAHTTEXT(1234567) returns หนึ่งล้านสองแสนสามหมื่นสี่พันห้าร้อยหกสิบเจ็ดบาทถ้วน. (2) Example for converting a decimal to a Thai text (with the integer part suffixed with บาท and the decimal part suffixed with สตางค์) BAHTTEXT(1234567.89) returns หนึ่งล้านสองแสนสามหมื่นสี่พันห้าร้อยหกสิบเจ็ดบาทแปดสิบเก้าสตางค์. | Example for ignoring the decimal part and converting the integer part to a Thai text (suffixed with บาทถ้วน) (1) BAHTONLY(1234567) returns หนึ่งล้านสองแสนสามหมื่นสี่พันห้าร้อยหกสิบเจ็ดบาทถ้วน. (2) BAHTONLY(1234567.89) returns หนึ่งล้านสองแสนสามหมื่นสี่พันห้าร้อยหกสิบเจ็ดบาทถ้วน. |

Holiday Function
NETWORKDAYS
The NETWORKDAYS function can be used to calculate the number of working days between two dates.
Function Name | |
NETWORKDAYS(start_date, end_date, [holidays]) | |
Parameter | Description |
start_date | This parameter specifies a start date. |
end_date | This parameter specifies an end date. |
holidays (optional) | This parameter specifies custom holidays.
|
Returned Value | |
(1) When each Sunday is a holiday from 2025-01-12 to 2025-01-19: NETWORKDAYS("2025-01-12","2025-01-19",[7]) returns 6. (2) When Saturday and Sunday are holidays from 2025-01-12 to 2025-01-19: NETWORKDAYS("2025-01-12","2025-01-19",[6,7]) returns 5. (3) When Saturday, Sunday, and 2025-01-13 are customized as holidays from 2025-01-12 to 2025-01-19: NETWORKDAYS("2025-01-12","2025-01-19",["2025-01-13",6,7]) returns 4. |
WORKDAY
The WORKDAY function can be used to obtain the working day N working day(s) after the start date.
Function Name | |
WORKDAY(start_date, days, [holidays]) | |
Parameter | Description |
start_date | This parameter specifies a start date. |
days | This parameter specifies the number of working days after the start date. This function will return a future date if the value is positive, and a past date if the value is negative. |
holidays (optional) | This parameter specifies custom holidays.
|
Returned Value | |
(1) When each Sunday is a holiday: WORKDAY("2025-01-12",7,[7]) returns 2025-01-20. (2) When Saturday and Sunday are holidays: WORKDAY("2025-01-12",7,[6,7]) returns 2025-01-21. (3) When Saturday, Sunday, and 2025-01-13 are customized as holidays: WORKDAY("2025-01-12",7,["2025-01-13",6,7]) returns 2025-01-22. |
HOLIDAYS
The HOLIDAYS function can be used to return an array of holidays from the start date to the end date.
Function Name | |
HOLIDAYS(start_date, end_date, locale) | |
Parameter | Description |
start_date | This parameter specifies a start date. |
end_date | This parameter specifies an end date. |
locale | This parameter specifies a regional language. Currently, the language can only be zh_CN (Simplified Chinese) or zh_TW (Traditional Chinese). If this parameter is left empty, the project language is used by default (effective only for zh_CN and zh_TW). |
Returned Value | |
(1) For Mainland China where 2025-04-04 to 2025-04-06 is Qingming Festival and 2024-04-13 and 2024-04-14 are weekends: HOLIDAYS("2025-04-01","2025-04-15","zh_CN") returns 2025-04-04,2025-04-05,2025-04-06,2025-04-12,2025-04-13. (2) For Taiwan (China) where 2025-04-03 to 2025-04-06 is Qingming Festival and 2024-04-13 and 2024-04-14 are weekends: HOLIDAYS("2025-04-01","2025-04-15","zh_TW") returns 2025-04-03,2025-04-04,2025-04-05,2025-04-06,2025-04-12,2025-04-13. |
ISHOLIDAY
The ISHOLIDAY function can be used to return whether the passed date is a legal holiday.
Function Name | |
ISHOLIDAY(date,locale) | |
Parameter | Description |
date | This parameter specifies the date to be judged. |
locale | This parameter specifies a regional language. Currently, the language can only be zh_CN (Simplified Chinese) or zh_TW (Traditional Chinese). If this parameter is left empty, the project language is used by default (effective only for zh_CN and zh_TW). |
Returned Value | |
(1) For Mainland China where 2025-04-03 is a workday: ISHOLIDAY("2025-04-03","zh_CN") returns false. (2) For Taiwan (China) where 2025-04-03 is one workday of Qingming Festival: ISHOLIDAY("2025-04-03","zh_TW") returns true. |
Template Download
Download the template Localized Function Collection Example (V1.4).cpt.