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

report is not loading if the data from server returned is null

Answered
sushma asked on July 30, 2018

HI 
The data source object is bind to the response from server. When the data from server is retured as null, the report is not renderd and an error is logged in console.
Could you please share a solution to display empty report when the response data is null from server
Thanks
Sushma

4 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster July 31, 2018

Hello Sushma,
Thank you for your question. Could you please specify the data source you are using for reporting? That should help us to find a suitable workaround for you. Also, could you please let me know if your company is an existing customer of Flexmonster or you're just testing it? We need this information for our records.
Waiting to hear from you.
Regards,
Dmytro

Public
sushma July 31, 2018

HI Dmytro, 
we are using JSON as our data source.
Our organisation holds a license of flexmonster. 

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster July 31, 2018

Hello Sushma,
Thank you for your quick reply. The recommended approach here is to replace the null response with the empty array result []. Also, you should set the media type as "application/json" . After that, the pivot's option property "showEmptyData" needs to be set with true. Here is the example:
report: {
   ...
   options: {       
      showEmptyData: true
   }
}
That should make pivot show an empty view when the data is not available. 
Please let us know if the suggested approach works fine for you.
Regards,
Dmytro

Public
sushma July 31, 2018

Thanks Dmytro 🙂

Please login or Register to Submit Answer