Invalid regular expression and visualize is not defined on Jasper Server Pro 6.0.0

I am using jasper server pro evaluation version 6.0.0 for Proof of Concept purpose about Visualize.js

I just follow visualizejs-getting-started tutorial and here is my fiddle code.

But no luck, I got an error below:

Error on Chrome

 Uncaught SyntaxError: Invalid regular expression: /[À-ß][€-¿]|[à -ï][€-¿]{2}|[ð-÷][€-¿]{3}/: Range out of order in character class
jasper1.html:13 Uncaught ReferenceError: visualize is not defined
Error on Firefox:
SyntaxError: invalid range in character class
...):h(e)},f=function(e){return p(e,!0)},m=new RegExp(["[À-ß][€-¿]","[à -ï][€...
visualize.js (line 72, col 27353)
ReferenceError: visualize is not defined visualize({
Please help, I'm stuck.


akun.register's picture
Joined: Dec 9 2014 - 6:01am
Last seen: 8 years 1 month ago

I found the solution for the issue. It seems that thre is a regex issue with the "m=new RegExp(["[À-ß][€-¿]","[à -ï][€...". I played around with the regex and able to get it to work. For now im using m = new RegExp(["[Àß-][€¿-]", "[àï-][€¿-]{2}", "[ð÷-][€¿-]{2}"].join("|"), "g"), . This might not be the intended regex. But far now it seems to work. 

apekshith.ramesha - 8 years 1 month ago

4 Answers:

The fiddle code worked for me. Could you make sure your installation works properly and you have JRS properly set up?

nthapa's picture
Joined: Jan 24 2014 - 9:53am
Last seen: 6 years 8 months ago

I have the same issue. Im able to get the server up and running and also upload few reports and run them on the server. but when i try to run the fiddle, there seems to be a problem with the js file. I'm not able to confirm with the v5.6 as there is no commercial version of the JRS trial available on the website.

apekshith.ramesha's picture
Joined: Dec 12 2014 - 7:42am
Last seen: 6 years 3 months ago

Please update the script src with ?_opt=false

see jsfiddle example:

script src=http://localhost:8080/jasperserver-pro/client/visualize.js?_opt=false

mcota_1's picture
Joined: Aug 8 2014 - 12:52pm
Last seen: 6 years 10 months ago

It looks like using the minimized version of visualize.js is completely broken. The only way to get it to work is by setting ?_opt=false

Setting _opt=true puts all the javascript files into 1 minified file instead of downloading all files individually.

I really hope they fix this, because the unminified version is incrediable slow to load.

jonasingvar's picture
Joined: Mar 2 2015 - 12:14pm
Last seen: 7 years 1 month ago

If you have a pro version, a hotfix resolves this via the cumulative patch for 6.0.

ghudson_1 - 7 years 10 months ago