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 2022-06-03 02:50:19

Johann
Member
Registered: 2022-05-30

Groovy Script Report - CSS and Javascript not applied when exporting

In the preview, the CSS and Javascript code run fine, but when I try exporting to HTML or PDF, I only get the plain markup that I used and do not have the styles or Javascript functions available.

I define my CSS in files on the ReportServer filesystem and refer to them in my Groovy script via URLs. For the Javascript functions, they are either referred to via URLs like my CSS, or included in a `script()` tag where I have `mkp.yieldUnescaped(<<JAVASCRIPT CODE>>)`

Any ideas how to resolve this? Thanks in advance!

Offline

#2 2022-06-07 09:10:04

Johann
Member
Registered: 2022-05-30

Re: Groovy Script Report - CSS and Javascript not applied when exporting

Found a solution. Web access to the CSS and JS folders needs to be enabled.

Offline

#3 2022-06-07 09:10:42

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Groovy Script Report - CSS and Javascript not applied when exporting

Hi Johann,

thanks for letting us know about your solution.

Regards,
Eduardo

Offline

#4 2022-06-08 06:04:04

Johann
Member
Registered: 2022-05-30

Re: Groovy Script Report - CSS and Javascript not applied when exporting

Unfortunately, the file/folder URLs are not accessible by other users as a VPN connection is required, so currently the CSS styles and JS functions only work on my own computer and not on other devices.

Does anyone have an idea of how to resolve this?

Offline

Board footer

Powered by FluxBB