#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

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