Vizualise.js does not render report

Hi,

 

I have to test vizualise.js, and I met an issue to display a report.

 

here is my code :

 

<html><head><script src="http://serverjasper:8080/jasperserver-pro/client/visualize.js?logLevel=debug"></script><title>My Report</title></head><body><script>visualize({    auth: {        name: "foeoj",        password: "lfjoff",organization: "organization_1"}}, function (v) {    //render report from provided resource    v("#container").report({        resource: "/rapport/rapport",        error: handleError    });    //show error    function handleError(err) {        alert(err.message);    }});</script><div id="container"></div></body></html>
When I test it on jsfiddle, it works fine and display my report.
When I put the code in a html plage, on my tomcat server, it displays a whole blank page.
I hope someone can help.
mvarnoux's picture
Joined: Apr 9 2013 - 1:52am
Last seen: 5 years 4 months ago

4 Answers:

If it can help :

 

Firefox debugger throws the following error :

 

TypeError: t is null

mvarnoux's picture
Joined: Apr 9 2013 - 1:52am
Last seen: 5 years 4 months ago

Hi,

 

I have been able to make it work on the server where is installed tomcat,  

According to https://community.jaspersoft.com/wiki/visualizejs-troubleshooting, I had to point scripts to http://127.0.0.1:8080/jasperserver-pro/client/visualize.js and your browser to http://localhost:8080/blah/sample.html.

So that's fine. But now, I need to make it work from the LAN

Does somedy knows how to do that ?

mvarnoux's picture
Joined: Apr 9 2013 - 1:52am
Last seen: 5 years 4 months ago

You will need to publish your file(s) to your production Web server, while making sure that your JasperReports Server remains online, too.  The JasperReports Server will also need to be up, online and available to your users across the network.  It looks like you are still working in a sandbox environment, maybe your won laptop.  Let me know if this helps.    

H Mendoza's picture
1835
Joined: Feb 20 2013 - 11:39am
Last seen: 3 years 11 months ago

Hi,

 

Thank you for your answer. Every things are online, and I am not working in a Sandbox.

 

In facts, this really this to be related to the bug describe here : https://community.jaspersoft.com/wiki/visualizejs-troubleshooting

I have made some others tests publishing my web page on another application server which is not a tomcat, and every thing is working fine.

But I would like to publish my file on the same web app that jasper, so I need a workaround to make it work with tomcat.

 

 

mvarnoux's picture
Joined: Apr 9 2013 - 1:52am
Last seen: 5 years 4 months ago
Feedback
randomness