Report hyperlinks
Use a master report and select from hyperlinks to open a secondary slave report.
by Stas_P
HTML
<!--Provide URL to visualize.js-->
<script src="http://underscorejs.org/underscore.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://localhost:8630/jasperserver-pro/client/visualize.js"></script>
<!--Provide container to render your visualization-->
<div>
<div style="width:830px;" id="main"></div>
<div style="width:500px;" id="drill-down"></div>
</div>
CSS
#main {
float: left;
}
#drill-down {
float: left;
}
JavaScript
visualize({
auth: {
name: "joeuser",
password: "joeuser",
organization: "organization_1"
}
}, function(v) {
v("#main").report({
resource: "/public/Ad_Hoc_spider_Report",
linkOptions: {
events: {
"click": function(ev, link) {
alert(JSON.stringify(link));
}
}
},
error: function(err) {
alert(err.message);
}
});
});