We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Remove date fields in totals

Answered
Rodrigo asked on March 4, 2020

Hi Team,
 
Is there a way to remove dates from the totals? Currently the behaviour is to show the lastest date in the total, correct?
 
Thank you,
 
Rodrigo

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 5, 2020

Hello, Rodrigo,
 
Thank you for reaching out to us.
 
You are right about the fact that the grand total of the datestring measure is the latest date in the data set.
 
In order to hide grand totals for all measures, the showGrandTotals property can be used. The detailed information about the property can be found on the page from our documentation dedicated to the options object.
 
However, in case only the grand total for mentioned datestring measure has to be hidden, we recommend using the customizeCell API provided by Flexmonster.
 
We would like to kindly draw your attention to the code snippet below:

flexmonster.customizeCell((cell, data) => {
if (data.measure && data.measure.uniqueName == 'Date' && data.isGrandTotal && data.type == 'value')
cell.text = '';
});

The method choose the cell that matches the parameters specified within the condition and change the inner text of the cell to an empty string.
 
Please see an example we have prepared for you.
 
More information about the customizeCell API can be found by the link.
 
We hope it works for you.
 
Do not hesitate to contact us in case any additional questions occur.
 
Kind regards,
Illia

Please login or Register to Submit Answer