This post is a replica of https://www.youtube.com/watch?v=_VoM7OYkcNQ&feature=youtu.be and this post is the test outcome for me.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<div id="container"><div>Why Jaspersoft</div></div>
<script type="text/javascript" src="http://localhost:8081/jasperserver-pro/client/visualize.js?_opt=false&logLevel=debug"></script>
<script type="text/javascript">
visualize(
{
auth:{
name:"jasperadmin",
password:"jasperadmin"
}
},function (v){
var report=v.report({
resource : "/public/Samples/Reports/9.CustomerDetailReport",
container:"#container",
params:{"customerId":[4033]}
});
});
</script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<div id="container"><div>Why Jaspersoft</div></div>
<script type="text/javascript" src="http://localhost:8081/jasperserver-pro/client/visualize.js?_opt=false&logLevel=debug"></script>
<script type="text/javascript">
visualize(
{
auth:{
name:"jasperadmin",
password:"jasperadmin"
}
},function (v){
var report=v.report({
resource : "/public/Samples/Reports/9.CustomerDetailReport",
container:"#container",
params:{"customerId":[4033]}
});
});
</script>
</body>
</html>
:-)
How do pass dynamic parameters example using some data structure:
ReplyDeletevar name =”Country”;
var value = “USA”;
var values = [value];
var myArray = {};
myArray[name] = values;
report
.params(myArray)
.run();
This code fails giving json schema errors