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

reportchange pass parameter

Answered
Mahdi Al Sheikh asked on February 24, 2020

how can i pass parameter to event “reportchange”

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster February 24, 2020

Hi Mahdi, 
 
Thank you for writing to us.
 
Kindly note that the reportchange event does not accept any parameters. It is used to detect any changes in the report configurations of the pivot table instance, for example:
 

flexmonster.on('reportchange', function () {
  alert('Report changed!');
});

 
More info on this event can be found here: https://www.flexmonster.com/api/reportchange/
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Public
Mahdi Al Sheikh February 24, 2020

 
Thank you for your response
but i want to send value to this event(reportchange) and do something and then return value ,
for example :
 

flexmonster.on('reportchange', function (Json) {   
alert
(Json.par1); })

 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster February 26, 2020

Hi Mahdi,
 
Please note that the mentioned event is triggered by Flexmonster and no external variables can be passed in as parameters. With that in mind, we would suggest requesting the necessary data directly in the body of the event callback. For example:

let jsonObj = {
str1: "Hello world!"
}

flexmonster.on('reportchange', function() {
alert(jsonObj.str1);
})

 
We hope this works for you.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer