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

How to Cancel report Loading

Answered
Majar K asked on October 30, 2018

Hi,
I use an API to generate report, the API takes time to respond. If I reload the report using setReport({}) with new parameters, the API (for previous report and previous report loading doesn't get cancelled. How to cancel it?

9 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster October 30, 2018

Hello Majar K,
Thank you for your question. It seems that the similar case was already discussed here: https://www.flexmonster.com/question/cancel-loading-report/.
Please let us know if you managed to resolve it.
Regards,
Dmytro

Public
Majar K October 31, 2018

Hi,
I tried that, but didn't work. The function (reloadReport()-below mentioned) will be called whenever the user changes the report parameters. But the previous API call will be running as it takes long to complete. Even if the current report is generated, the 'loading data' popup doesn't get closed until the previous API call returns response

function reloadReport(){
flexmonster.clear();
flexmonster.setReport({options})
}
Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster November 1, 2018

Hello Majar K,
Thank you for your feedback. We have double checked clear() API call and it stops the loading data process.
Could you please check whether you are using the latest version of the component? You can do it by pressing: Ctrl + Alt + i. Currently, the latest version of the component is 2.6.6. In case you need to update the component please follow the instructions: https://www.flexmonster.com/doc/updating-to-the-latest-version/ .
 
If the update to the latest version was not helpful please provide us with the code example which describes your case. The jsfiddle example is appreciated.
Please let us know in case you need any other assistance.
Regards,
Dmytro
 

Public
Majar K November 9, 2018

Hi Dmytro,
The clear() api is cancelling the report loading. But the API(The data set I'm using) call is not getting cancelled and in processing state. Shouldn't it be also cancelled. Or is  there anyway to cancel it. We are generating report using CSV file
Thanks,
Majar

Public
Tanya Gryshko Tanya Gryshko Flexmonster November 9, 2018

Hello, Majar,
Thank you for specifying the additional details. Our development team will add the improvement to the clear() API call to cover this case as well. The update will be released on December the 3rd.
Please let me know in case of any other questions.
Regards,
Tanya

Public
Majar K November 19, 2018

Hi Tanya,
Thanks for the support, The issue is breaking our app when user calls an API which takes more than 10 seconds to return the data and the "Loading data... waiting for the response" popup doesn't get closed. I hope that the update solve the issue

Thanks,
Majar K
 

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster December 4, 2018

Hello Majar,
We are glad to inform you that the improvement to the clear() API call has already been released.
You are welcome to update the component.
Regards,
Dmytro

Public
Majar K July 9, 2019

Hi,
Is there any way to cancel the export process?
Please see this link , If I try to export the report (which has 100K rows), it takes little long (I think it's okay as the report is very large) to generate the report. But the user should be able to cancel the process too.

Public
Vera Didenko Vera Didenko Flexmonster July 10, 2019

Hello, Majar,
 
Thank you for your question.
 
At the moment canceling the export process is not possible in Flexmonster.
 
We have added your request to our customers' wishlist and we will notify you in case of any updates on the matter.
 
Please let us know if you have any questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer