Get Free Trial
Get Free Trial

How to retain the layout format after save into local DB

Answered
MKS asked on June 14, 2019

Step 1: My requirement is to save layout format into DB.
Step 2: Later on, I need to open flexmonster report with same layout  which i was selected on save(ie., Flat form, Classic form or compact form) 

1 answer

Public
Vera Didenko Flexmonster June 18, 2019

Hello,
 
Thank you for writing to us.
 
1) We would like to point out that you can get the current report configurations, including the layout selected by the user (this is specified in the options parameter of the report object), with the getReport() API call.
 
Please note that if no layout was selected, Flexmonster applies default options.
An important remark is that default properties don’t get saved to the report in order to optimize the size of the report object.
To get the current report together with the default options you can specify the withGlobals parameter in the getReport() API call:

pivot.getReport( {withDefaults: true} );

 
Here is a JSFiddle example for illustration.
 
2) We kindly advise using the setReport() API call to load and show previously saved reports. Please note that the layout will be restored together with the report.
 
You are welcome to contact us in case any questions arise.
 
Best Regards,
Vera

Please login or Register to Submit Answer