Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

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

BlueSwimmer
Member
Registered: 2017-03-31

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?

Thanks.

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

Offline

Board footer

Powered by FluxBB