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

Is there a way to cache loaded data locally and reload it into component?

Answered
Dominik Crnojevac asked on March 30, 2017

What I am trying to acomplish is to avoid reloading data when loading a new report(if the same report has already been loaded before). To be more specific I have been wondering is there a way to convert the rawData you get from the getData function into a format that can be used in updateData method(inline JSON). Also if there is another way around this I would like to know.
UPDATE:
I found out you can pass a slice object to the getData method. So my question is now: can this be done for “microsoft analysis services” datasources, i.e. can you store the loaded data and reload it into component so it doesn’t do the initial fetch?

Regards,
Dominik

3 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster March 31, 2017

Hello Dominik,
Thank you for your question. Firstly, we would like to mention that getData method is used for integration with 3rd party charting libraries thus it would not work in your case. Secondly, caching of the loaded data when reloading the web page is not provided by our component.
To avoid reloading of data when loading a new report we suggest you try global parameter of $.flexmonster() method. Set the dataSource in global object and it will be applied to all reports. global has the same structure as Report Object. Please have a look at the following example on JSFiddle demonstrating how this approach works. We would be grateful for your feedback.
Regards,
Tanya

Public
Dominik Crnojevac April 3, 2017

Thank you for your answer. In my case I cannot use the global property unfortunately, since I am using a proxyUrl that changes. I found some ways to reduce loading time with runQuery method, but it seems I will have to use setReport(because of the changing proxyUrl I mentioned).
Regards,
Dominik

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 3, 2017

Hello Dominik,
Yes, you are right, using setReport() API call is the only suitable solution for you.
For now, we cannot suggest you anything more.
Please let us know if you have additional questions.
Best regards,
Dmytro.

Please login or Register to Submit Answer