#1 2017-03-31 06:10:17

Registered: 2017-03-31
Posts: 1

Running BIRT reports which reference java libraries

Due to a bug in BIRT where a last day of the year gets incorrectly formatted with native BIRT formatter function, e.g. 2017-12-31 turns into 31/12/2018, I would like to use java libraries instead.

This code is used in BIRT and is functional in reports generated by BIRT directly:

<VALUE-OF>df = new java.text.SimpleDateFormat("dd/MM/yyyy");df.format(row["DateTo"]);</VALUE-OF>

DateTo contains date time format, e.g. '2017-12-31 00:00:00.000'

When I upload the BIRT report into ReportServer (RS3.0.2-5855), the following error message is displayed in HTML output:

ReportDesign (id = 1):
+ There are errors evaluating script "df = new java.text.SimpleDateFormat("dd/MM/yyyy");df.format(row["DateTo"]);":
ReferenceError: "java" is not defined. (<inline>#1)

How I can reference java package in ReportServer? Do I need to include some script in BeforeOpen area of dataset?


Last edited by BlueSwimmer (2017-03-31 06:10:42)


Board footer

Powered by FluxBB