Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

BUG: null report when calling `getReport()` after `reportchange` event

Re-Open
eze@wejugo.com asked on July 16, 2020

This only happens when the report has a dataSource type of “api”.
If for example I add the following event handler:

pivot.on('reportchange', ($event) => {
   console.log(pivot.getReport());
});

After certain actions, for example:

  • adding a new field to the report
  • filtering one of the fields

The Pivot.getReport function returns a null report in the event handler.
After other actions like:

  • Sorting
  • Altering options
  • Switching to charts
  • Etc.

The function returns a report as expected.
 
This isn’t the same when the report is a CSV for example, in which case everything works as expected.
This is tested on the latest (2.8.11) version.
 
 

8 answers

Public
Vera Didenko Flexmonster July 16, 2020

Hello, 
 
Thank you for reporting this problem to us. 
 
We have managed to reproduce the issue on our end as well. 
Our team will provide the fix to this issue in the minor release version with the ETA 24th of August.
 
In the meantime, as a workaround, we kindly suggest using a combination of two events: reportchange and reportcomplete
Looking deeper, we have noticed that for the custom data source API, the reportchange event is fired before the changed report object is ready. 
The reportcomplete event can be used to get the changed report object.
Here is a JSFiddle example for illustration: http://jsfiddle.net/flexmonster/qdytz2f5/
 
 
Please let us know if this would work for you. 
Looking forward to your response.
 
Kind regards, 
Vera

Public
eze@wejugo.com July 20, 2020

Ok, thank you for that insight, using reportcomplete in combination works reasonably well as a workaround.

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 26, 2020

Hi!
 
We are happy to let you know that the issue with getReport() returning null after the reportchange event was fixed.
 
This is included in the 2.8.14 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component. Here is our updating to the latest version tutorial for guidance: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 
 
Please let us know if everything works fine for you.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster September 2, 2020

Hi!
 
Hope you’re doing well.
 
We were wondering if you’ve received our previous heads-up regarding the latest update. Have you had a chance to test this on your side?
 
We would be happy to hear your feedback.
 
Regards,
Mykhailo

Public
eze@wejugo.com September 4, 2020

Hello there Mykhailo,
Thanks for your message. We have received your update and have now tested the new version of the component. 
I can confirm that it is indeed working as expected now 🙂

I wanted to report a little css/rendering bug that I noticed in the last version, when using the fields menu on the right, see here: https://jsfiddle.net/ezk84/r08dkf6b/
Notice that the buttons to close the bar, as well as to add calculated measures now overflow the container and aren’t completely visible. 
 
Regards,
Ezequiel

Public
Milena Pechura Milena Pechura Flexmonster September 4, 2020

Hello!
 
Thank you for reporting the issue and providing detailed info about it.
 
We have managed to reproduce the reported behavior on our side – the fix for the issue is going to be provided with a minor release ETA Sep 7th.
 
Please let us know if any other questions arise.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster September 8, 2020

Hello,
 
We are glad to announce that the issue with buttons’ icon alignment (CSS) for fieldListPosition: ‘right’ was fixed.
 
This is available in the 2.8.15 version of Flexmonster: https://www.flexmonster.com/release-notes/.
You are welcome to update the component.

Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please contact us in case any questions arise.
 
Best regards,
Milena

Public
eze@wejugo.com September 9, 2020

Great, that works as expected. Thank you!

Please login or Register to Submit Answer