Visualize: Render Adhoc View
Test plugins
by juliia13
HTML
<script type='text/javascript' src="http://192.168.88.99:8101/14-jrs-6.3.0/client/visualize.js"></script>
<button id='export' onclick='exportReport()'>export</button>
<div id="container"></div>
CSS
#container{
height:400px;
}
JavaScript
visualize({
auth: {
name: "superuser",
password: "superuser"
}
}, function (v) {
var report = v.report({
resource: "/public/Samples/Reports/01._Geographic_Results_by_Segment_Report",
container: "#container",
success: function() { console.log("rendered"); },
error: function(e) { alert(e); }
});
exportReport = function () {
var _expOption = {
outputFormat: 'pdf'
};
report["export"](_expOption, function (link) {
window.location.href = link.href ? link.href : link;
}, function(e) { alert(e); });
};
});