Should setReport method trigger reportchange event?

Answered

Should ‘setReport’ method trigger ‘reportchange’ event? Although report configuration has changed after using ‘setReport’, ‘reportchange’ event is not triggered. Is it a bug, or is it intended behaviour?
There is no information in documentation, what triggers ‘reportchange’ event, could you please list the actions/methods that trigger the event?
http://jsfiddle.net/L0n1r933/27/

2 answers

Public
Dmytro Zvazhii Flexmonster October 24, 2018

Hello Jurģis,
Thank you for writing. The setReport() API call resets the entire report. In case you need to track it, please use reportcomplete event. The reportchange event is not triggered when the entire report was changed.
The other approach is to track partly updates of the report without rewriting the whole report. That is the case where we recommend using reportchange. Please find the list of API calls which trigger the reportchange event here:

expandAllData(),
expandData(),
collapseData(),
setFitler(),
clearFilter(),
sortValues(),
setSort(),
setTopX(),
setBottomX(),
setFormat(),
runQuery(),
addCondition(),
removeCondition(),
removeAllContidions(),
addCalculatedMeasure(),
removeCalculatedMeasure(),
removeAllCalculatedMeasures()

You can find more information about the methods described above in our docs: https://www.flexmonster.com/api/.
Please let us know in case of any other question.
Regards,
Dmytro

Public
Jurģis Šēnbergs October 24, 2018

Hello Dmytro,
 
Thank you very much for the answer. It is clearer now how events work. I will see if it is possible to use `reportcomplete` in our case.

Please login or Register to Submit Answer