Need a special offer?Find out if your project fits.
+

How to avoid tuple objects in slice for expand/collapse state management?

Answered
Ravi asked on August 8, 2019

Hi Team,
 
How to avoid tuple objects in 'slice->expands->rows/measures' list?. This occupies our DB space storage as much.

Can you handle this using a boolean or is there any other way?

7 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster August 8, 2019

Hello, Ravi,

Thank you for your question.

We would like to inform you that this information is stored in order to determine what to expand when parsing the report. In case it is removed, the expands will not be restored.

Please let us know in case of other questions.

Regards,
Tanya

Public
Ravi August 8, 2019

can we have like below in pivot config?
"rows":[{"uniqueName": "Year","sort": "asc","expands":true},{"uniqueName": "Month Name","sort": "asc"}]

Public
Ian Sadovy Ian Sadovy Flexmonster August 14, 2019

Hello Ravi,
 
Thank you for the answer and apologies for a slight delay.
In case there is no need to save expands, you can easily remove expands/drills from the report Object before saving to the DB and it does not require any additional configuration on Flexmonster.

var report = pivot.getReport();
delete report.slice.expands;
delete report.slice.drills;

Please take a look at the following sample: https://jsfiddle.net/flexmonster/09v8b7ed/
 
Hope it helps.
 
Regards,
Ian
 

Public
Ravi September 13, 2019

Hello Ian Sadovy,
We need to save expands/collapse state for columns/rows into DB.
And also, we should avoid tuples which acquires lot of data to save in report.

We need some great solutions. please help us.

Public
Ian Sadovy Ian Sadovy Flexmonster September 13, 2019

Hello Ravi,
 
Thank you for your answer.
Please note, that saving specific tuples for rows/columns are required to restore specific expands in the future when loading the report. Every tuple represents one expanded row or column and currently, there is no option to avoid it if you need expanded rows/columns by default.
In case you do not want to save expands to the DB, you can remove them (see our previous recommendations) and then perform some expands programmatically when loading reports using expandData() or expandAllData() methods.
 
Hope it helps.
 
Regards,
Ian

Public
Ravi September 14, 2019

Hello Ian Sadovy,
I Understand your answer,
We are handling Lacks of records.in this case the tuples are require more DB space.
But here our query is need to save row/column level expand/collapse state.

So can you provide a solutions to save the states for columns/rows header level instead of every row/columns?

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster September 16, 2019

Hello Ravi,
Thank you for writing to us.
 
Currently, the main idea of the report structure is to support all the existing functionality. The slice structure may look a bit overloaded at first glance but it allows to restore different states such as fully expanded hierarchies and semi-expanded hierarchies.
The existing structure allows making sure that all the levels will be successfully restored from the report. 
 
Also, such format is pretty much easy to read and understand. That makes the support of the reports more pleasant. 
Please note that the possible size optimization can lead to the significant difficulties in understanding reports which in long term perspective will make it difficult to support such reports.
 
Considering all the possible consequences of such optimization we have no plans on changing the existing state of the report structure.
Currently, the only possible solution to avoid tuples is to exclude them from the report and then restore programmatically as discussed above.
 
Best regards,
Dmytro

Please login or Register to Submit Answer