API call getReport - parameters withGlobals & withDefaults
Configuring report
by chrisPhillipsWk
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<button onclick="getReportGlobals()">Get Report with globals</button>
<button onclick="getReportDefaults()">Get Report with defaults</button>
<button onclick="getReportGlobalsDefaults()">Get Report with globals and defaults</button>
<div id="pivot-container">The component will appear here</div>
JavaScript
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
global: {
options: {
defaultHierarchySortName:"desc"
}
},
report: {
dataSource: {
filename: "https://cdn.flexmonster.com/data/data.csv"
}
}
});
function getReportGlobals() {
console.log(pivot.getReport({
withGlobals: true
}));
}
function getReportDefaults() {
console.log(pivot.getReport({
withDefaults: true
}));
}
function getReportGlobalsDefaults() {
console.log(pivot.getReport({
withGlobals: true,
withDefaults: true
}));
}