We have updated WebDataRocks EULA, effective as of April 18, 2024. Learn more about what's changed.

How to hide the subtotal column when columns of slice has multi

Answered

 Hi team.
Please help to hide the subtotal columns.  
Thanks
 

<html>
 
<head></head>
 
<body>
 
<div id=”wdr-component”></div>
 
<link href=”https://cdn.webdatarocks.com/latest/webdatarocks.min.css” rel=”stylesheet”/>
 
<script src=”https://cdn.webdatarocks.com/latest/webdatarocks.toolbar.min.js“></script>
 
<script src=”https://cdn.webdatarocks.com/latest/webdatarocks.js“></script>
 
<script>
 
 
var data =[
 
{
 
“Name”: “Tom”,
 
“Term”: “Midterm”,
 
“Course”: “Physical”,
 
“Score1”: “40”,
 
“Score2”: “41”
 
},
 
{
 
“Name”: “Tom”,
 
“Term”: “Midterm”,
 
“Course”: “Mathematical”,
 
“Score1”: “50”,
 
“Score2”: “51”
 
},
 
{
 
“Name”: “Tom”,
 
“Term”: “Final”,
 
“Course”: “Physical”,
 
“Score1”: “45”,
 
“Score2”: “46”
 
},
 
{
 
“Name”: “Tom”,
 
“Term”: “Final”,
 
“Course”: “Mathematical”,
 
“Score1”: “55”,
 
“Score2”: “56”
 
}
 
]
 
 
var pivot = new WebDataRocks({
 
container: “#wdr-component”,
 
toolbar: true,
 
report: {
 
dataSource: {
 
data: data
 
},
 
slice: {
 
rows: [{
 
uniqueName: “Name”
 
}],
 
columns: [
 
{
 
uniqueName: “Term”
 
},
 
{
 
uniqueName: “Course”
 
}],
 
measures: [{
 
uniqueName: “Score1”,
 
aggregation: “max”
 
},
 
{
 
uniqueName: “Score2”,
 
aggregation: “max”
 
}]
 
},
 
options: {
 
grid: {
 
showTotals:”off”,
 
showGrandTotals:”off”
 
}
 
}
 
}
 
});
 
</script>
 
</body>
 
</html>
 

Attachments:
att.jpg

2 answers

WebDataRocks Team WebDataRocks June 11, 2020

Hi Gerry,
 
Thank you for posting your question.
 
Please note that this is the default behavior of the pivot table and it cannot currently be changed.
 
However, this and much more is possible with Flexmonster Pivot Table & Charts, which is a more advanced product developed by our team. Flexmonster extends the WebDataRocks functionality by far, offering the user a ton of different features, the ability to connect to any data source etc. – all of this comes with a detailed documentation, improved support and exclusive features for clients.
 
We hope this helps.
 
Best regards,
WebDataRocks Team

gerry June 12, 2020

Hi team.
Thank you very much!