There are instructions in the manual, you can refer to:
Dates
You can substitute the current date by using the expression f[date]f. This will output the current date in yyyy-MM-dd format e.g. 2017-11-10. You can use the expression f[datetime]f to substitute the current date and time in yyyy-MM-dd HH:mm:ss.SSS format e.g. 2017-11-10 11:25:21.045. Both date and datetime field expressions can also specify a different date other that "now" and additionaly specify the output format, output format locale, input format and input format locale. These additional items are specified separated by | i.e f[date field name|date specification|output format|output format locale|input format|input format locale]f.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Field expressions work with predefined "fileds" - user name, current date etc.
You can use groovy expression instead.
If "execDate" parameter is of type Date then expression should be like:
{"fileName" : "Listing as of g[execDate.value.format('dd-MM-yyyy')]g"}
Last edit: Kan 2023-09-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can add the class name (art.reportparameter.ReportParameter) to groovy-whitelist.txt or set "enableGroovySandbox" to false in art-custom-settings.json and restart.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
I try to but no success with Date parameter. Eg.
fileName: "Listing as of f[#execDate#|dd-MM-yyyy]f"
The result will shown as "Listing as of f_2023-08-30-00-00-00|dd-MM-yyyy_f"
Thanks
Sirichoke K.
There are instructions in the manual, you can refer to:
Dates
You can substitute the current date by using the expression f[date]f. This will output the current date in yyyy-MM-dd format e.g. 2017-11-10. You can use the expression f[datetime]f to substitute the current date and time in yyyy-MM-dd HH:mm:ss.SSS format e.g. 2017-11-10 11:25:21.045. Both date and datetime field expressions can also specify a different date other that "now" and additionaly specify the output format, output format locale, input format and input format locale. These additional items are specified separated by | i.e f[date field name|date specification|output format|output format locale|input format|input format locale]f.
I succeed with data, datetime, but have no luck with report paramerter.
My point is trying to customize date parameter into my desired format.
Can u suggest me the sample of this?
Field expressions work with predefined "fileds" - user name, current date etc.
You can use groovy expression instead.
If "execDate" parameter is of type Date then expression should be like:
{"fileName" : "Listing as of g[execDate.value.format('dd-MM-yyyy')]g"}
Last edit: Kan 2023-09-18
Thanks but still out of luck....
I followed your advice but error occurred....
You can add the class name (art.reportparameter.ReportParameter) to groovy-whitelist.txt or set "enableGroovySandbox" to false in art-custom-settings.json and restart.