Basic Report Embed
Simple initialization of the library, plain text authentication and loading a report
by Pavel Savushchyk
HTML
<script src="http://bug-js-24404-font-size_lastbuild.pfa.jaspersoft.com:8080/jasperserver-pro/client/visualize.js"></script>
<div id="container"></div>
CSS
#container {
width:400px;
}
JavaScript
visualize({
auth: {
name: "joeuser",
password: "joeuser",
organization: "organization_1"
}
}, function (v) {
//render report from provided resource
v("#container").report({
resource: "/public/Samples/Reports/14g.PerformanceSummary",
error: handleError
});
//show error
function handleError(err) {
alert(err.message);
}
});