We recently migrated from version 2.2 to 2.3.
We had a perfectly working pivot, but after installing the update several functionalities were broken which is quite strange for a minor version update..
The problem occurs when updating the data of the report. We sometimes only want to update the data and leave everything else as is (rows, columns, filters, …).
We always did this by just setting the data param of the report directly and then calling setReport(report).
We tried using the updateData() call instead and then the data is updated fine, but the config of our pivot is lost.
I think as this is a minor version update, setting the data parameter should still work as it did in version 2.2, no?
Thanks in advance for your answer
Thank you for your feedback. 2.2 and 2.3 versions are major updates. That is why some important changes have been made in 2.3 version. To know more about the changes, please visit our migration guide http://www.flexmonster.com/doc/migration-guide/ . Speaking about the issues you have described:
1. The report structure has been changed. Here is the jsFiddle example https://jsfiddle.net/flexmonster/63qt6rbw/.
2. updateData() API call should not reset the configuration, only the data should be changed. The issue was reproduced on our side and it will be fixed in the next minor release 2.305 (ETA Dec 19).
Does the above work for you?
Thanks for the reply.
Unfortunately, I have the same issue when I set report.dataSource.data, the data is updated but my config is lost..
Thank you for your reply. Could you please provide us with the code example so we can reproduce the issue on our side? Please update the jsFiddle we have sent you previously the way you are using the component. Also could you please tell us what version you are currently using? To get the version information press Ctrl+Alt+i.
I found the cause of this issue. The problem was that we let users save the config of the pivot in our db.
Later users can reuse this config. The problem is that these configs are stil the old version so there is no dataSource field in them yet. I just had to adapt our code to support both formats. Now it seems to work.
It’s nice to hear that our workaround works fine for you. Please note that it’s a temporary solution. In such cases, we recommend using updateData API call, which will be fixed in version 2.305 (ETA Dec 19) .
I have one additional problem with this approach.
We use sorting on the columns like so:
This works fine when initally loading the pivot, but with the same approach as in https://jsfiddle.net/flexmonster/63qt6rbw/, when you set a large amount of data (+ 50k records), the sorting information is lost. (with a small dataset it’s fine)
It seems the SetReport() call is async and when the dataset is large enough, not everything is executed in the right order. Is this possible?
Thank you for reporting.
We have managed to reproduce the issue with the large dataset (https://jsfiddle.net/flexmonster/gefwpxyc/).
The fix will be available in the next minor release (ETA Dec 19).
Does it work for you?
Please download the fix for updateData() method from here: https://s3.amazonaws.com/flexmonster/bluecrux/FLEXMONSTER-2016-BLUECRUX-DEC08.zip
We will include it in the next minor build.
I have similar issue with 2.322.
To recreate the issue please user your JSFiddle example (http://jsfiddle.net/flexmonster/xf5rn80j/)
Step 2: Click button “Update data from inline JSON”
Step 3: Sort on “Total Sum of Price”
Step 4: Click button “Update data from inline JSON” & “Update data from inline JSON 2” alternatively to see “Color” blue & green swapping places
Thank you for your question. We have checked the code examples and found nothing wrong there. When you are applying the sorting order for Total Sum of Price, you will be choosing between asc (ascending) and desc (descending) type of sorting. Considering the fact that you are using 2 different JSON datasources, it is quite natural that after the sorting is applied the “green” and “blue” will change places. Let me show it to you. First JSON has the next values:
color: green | color: blue
price: 174 | price: 274
The second JSON object has the opposite values:
color: green | color: blue
price: 274 | price: 174
Therefore, when you update the data the sorting order will remain the same (the lowest value is still on the top of the list) but due to the fact that the values are referring to the other colors now, you can observe the swapping of “green” and “blue”.
Please let us know if you have any additional questions here.
Hi Dmytro Zvazhii,
Sorry we beg to differ this.
Please contact Olena Maistrenko @ Flexmonster for clarification.