paroney Posted August 11, 2017 Share Posted August 11, 2017 Multiple reports (or charts) are displaying OK in Safari, Firefox, but not in Chrome.Sample script (below) returns an "unexpected.error" from within visualize.js when run on Chrome for the first report, but displays the second report correctly. It works perfectly on Safari and Firefox and displays both reports.Please do not suggest using differnt format script to produce multiple reports, as this format using multiple is required (as it is simultating our need for multiple discrete portlets that may be defined for a Liferay deployment).<script type='text/javascript'> window.onload=function() { visualize.config({ auth: { name: "jasperadmin", password: "jasperadmin" } }); visualize(function (v) { v("#container1").report({ resource: "/public/Samples/Reports/06g.ProfitDetailReport", error: function (err) { alert(err.message); } }); }); visualize(function (v) { v("#container2").report({ resource: "/public/Samples/Reports/State_Performance", error: function (err) { alert(err.message); } }); }); }</script><script src="whetever..../jasperserver-pro/client/visualize.js?_opt=true"></script><div id="container1"></div><div id="container2"></div> Link to comment Share on other sites More sharing options...
paroney Posted August 14, 2017 Author Share Posted August 14, 2017 Further Info -It can also crash in Firefox as well. If you artificially slow down your connections it fails. It appears to be the token that is the issue. The first iteration executes which loads a token, and then the second iteration overwrites that token, and so on. The token seems to be stored as a static / global variable, and so when the next request is made it uses the wrong token and fails. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now