fetchReport Problem

Hello there,

We are also having problems saving, deleting and listing reports. We save the reports in the database. Http requests (getting the list, adding a new report, and deleting a report) take some time. That's why fetchReport doesn't work the way we want it to. How do we trigger fetchReport after http requests are finished?

3 Replies 1 reply marked as answer

MM Manikandan Murugesan Syncfusion Team May 19, 2021 01:14 PM UTC

Hi Namig, 

Kindly use the below code example to update the report list dynamically after the fetch request is completed. 
Code Example: 
updateReport() { 
    let reportCollectionstring[] = []; 
    let reeportListstring[] = []; 
    if (localStorage.pivotviewReports && localStorage.pivotviewReports !== '') { 
      reportCollection = JSON.parse(localStorage.pivotviewReports); 
    } 
    reportCollection.map(function(itemany): void { 
      reeportList.push(item.reportName); 
    }); 
    // Here you can refresh the report list by feeding updated datsource fetched from your DB. 
    var reportListObj = (document.querySelector( 
      '#' + this.pivotObj.element.id + '_reportlist' 
    ) as any).ej2_instances; 
    if (reportListObj) { 
      reportListObj[0].dataSource = reeportList; 
      reportListObj[0].value = (this.pivotObj.toolbarModule as any).currentReport; 
    } 
  } 
 


If this doesn’t resolve your problem, then kindly send your sample that replicating the problem. This would be a very helpful for us to investigate the reported problem at our end and provide the solution at earliest. 

Regards, 
Manikandan 



NA Namig Abdukarimov May 20, 2021 06:52 AM UTC

Thank you so much. The problem has been solved

Marked as answer

MM Manikandan Murugesan Syncfusion Team May 21, 2021 09:06 AM UTC


Hi Namig, 

Please let us know if you have any other queries. We are always happy to assist you. 
 
Thanks, 
Manikandan. 


Loader.
Up arrow icon