Get Free Trial

Report Layout

Ranjith asked on May 19, 2021

Hi I have flexmonster grid loaded with some data and users will be making changes to the layout and do some conditional formatiing of the data and they would need to save that as a template and reuse that templatenext time when they run the report with diffrerent set of data
Is this possible

3 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 20, 2021

Thank you for posting on our forum.
If we understand correctly, your requirement is to save the component’s configuration and restore it afterward with a different dataset of the same structure (same fields’ names, types, etc.).
If so, we suggest saving the configured report to some local or remote storage. A report is a definition of what data should be shown in the component and how it should be visualized. Next, the report can be retrieved from this storage and loaded to the Flexmonster instance.
The report can be saved both locally and remotely using the save API call. You can open the saved report using either open or load methods for local and remote reports respectively.
Updating the dataset depends on the data source used in your case.
For example, if you are connected to the remote JSON/CSV file which is regularly updated, its latest version will be loaded to the component after opening the corresponding report. The same goes for other remote data sources (Elasticsearch, SSAS, Flexmonster Data Server).
If the data is represented as an inline JSON, or it needs to be updated from another remote data source, please use the updateData method. It helps to update data for the report without cleaning the report. Only the dataSource is updated, whereas the slice, all defined options, number, and conditional formatting, the scroll position stay the same.
Please let us know if it helps.
Looking forward to hearing from you.
Kind regards,

Ranjith May 20, 2021

Do you have a smapple fiddle I am using Json data source

Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 21, 2021

We have prepared a sample JSFiddle that would demonstrate this scenario: Also, in the attachments, you will find the screen record demonstrating the following set of steps:

  1. Configure the initial report;
  2. Save the configured report. In the example, it is saved locally. Save it to the server if needed;
  3. Open the saved report;
  4. Update the data. The example uses static JSON data, therefore the data needs to be updated manually. If you use the remote JSON file, Flexmonster will load the latest version of this file from the specified endpoint.

Please let us know if it helps.


screen record.gif

Please login or Register to Submit Answer