Hello again, I need your help ...
Once I loaded the data in the flexmonster table from a server (at the end point)
How can I get to load the same data but with different configurations without having to reload the data from the server.
My files (csv) are large, so I want to avoid recharging and because it has the same information
Hello Jesus,
Thank you for your question. We have attached two configuration files as an example. Both of them are referring to the same sales.csv
data file. However, when you load the first one and after that the second one you can notice that the data was loaded only for the first report. The second one does not require loading the data, it applies the configuration on the same data. You can open Network
tab in the developer's window of your browser and check that there was no sales.csv
loading process for the second report. The key idea is to have the same dataSourceType
and filename
properties in the reports.
Please let us know if it works for you.
Regards,
Dmytro
Ok, But the URI that I set to filename attribute changes because we use a SAS token in the query string and we need to refresh it when it expires and that does not means that the report has changed.
Hello Jesus,
Thank you for your feedback. Our component does not compare the data sets. Therefore, it implies that the same data source filename leads to the same data and if it was changed, then the data was also changed. In such case, you can try making a proxy URL which is not changeable and leads to the URL which uses query string. Also, there is an alternative approach. If you cannot create proxy URL please consider the idea of changing only the configuration and not data. For such case, you can try our API calls such as runQuery(), setOptions(), setFormat(). Such approach allows changing only the configuration and not reloading the data. Please find the list of all available API calls with the examples in our documentation: https://www.flexmonster.com/api/.
Let us know if it solves the case.
Regards,
Dmytro
Is this response still valid? Will having two reports with same dataSourceType and filename prevent it from requiring the same file twice? would this work to save bandwidth for a multi-fm dashboard?
Hello, Michael!
Thank you for your question.
For this approach to work correctly, the first request needs to be cached before all the following would try to load the data. You can use the reportcomplete
event to achieve such behavior.
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/5ac9kbtf/.
To ensure the second data request is cached, open the dev tools(press F12), go to the network
tab, and run the example.
Please note that this approach would work only for CSV/JSON datasource.
Could you also specify your data source? It would help us to give you more relevant suggestions in the future.
We hope it helps. Looking forward to your response.
Regards,
Solomiia
Hello, Michael!
Hope you are doing well.
Our team is wondering if you had a chance to try the suggested caching approach. Could you let us know if it works for your data source?
Looking forward to hearing from you.
Regards,
Solomiia
Hello, Michael!
Hope you are having a great week.
Just checking in to ask if the suggested caching approach was helpful for your case.
Looking forward to your response.
Regards,
Solomiia