JSFiddle - React, Tailwind, and code Playground
by tsareg
HTML
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://build-master.jaspersoft.com:6880/jrs-pro-feature-dashboard-hyperlinks-self-target/client/visualize.js"></script>
<button id="button" disabled>Export</button>
<!--Provide container to render your visualization-->
<div id="container"></div>
JavaScript
visualize({
auth: {
name: "jasperadmin",
password: "jasperadmin",
organization: "organization_1"
}
}, function (v) {
var report = v.report({
resource: "/public/Samples/Reports/5g.AccountsReport",
success: function () {
report.export({
outputFormat: "pdf",
pages: {
anchor: "Newton"
}
}, function (link) {
var url = link.href ? link.href : link;
window.location.href = url;
}, function (error) {
console.log(error);
});
}
});
});