Hi,
Most of the examples I saw under visualize.js are using localhost. I do not have jasperserver installed on local, so I am trying to connect to remote server to create sample html using visualize.js. But I am not able to see the report on html and getting below error.
TypeError: t is null
Line 64
Here is simple html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Visualize</title>
</head>
<body>
<h2>Simple Visualize.js</h2>
<div id="container"></div>
<script type="text/javascript" src="http://myremoteserver:8080/reportservice/client/visualize.js"></script>
<script type="text/javascript">
visualize(
{
auth:{
name:"admin",
password:"admin",
organization:"test"
}
},function (v){
//render report from provided resource
v("#container").report({
resource: "/organizations/test/temp/MyReport",
error: handleError
});
//show error
function handleError(err) {
alert(err.message);
}
});
</script>
</body>
</html>
I am wondering if remote server is supported or not. If not how can I create simple html and test report with visualize.js ?
Thanks
2 Answers:
Posted on November 1, 2015 at 10:20am
Remote servers are supported because I'm using it in one of my site.
I just tested it on a local server and replaced the server ip address afterward.
There may be a firewall preventing access.
1. Check if visualize.js file on the remote server can be opened from the web browser.
2. Check if the report can be accessed using REST v2 API.