I'm trying to get async data within onInteraction function by variables, but if data comes a little bit too late, the report won't show it and the async things actually doesn't help.
Not sure what is happening under the hood, but if I'm not setting slower internet it gets data in time and shows correctly, but if I slow down the internet even a bit it doesn't get it in time and the regData() and synchronize() functions won't do anything for me.
The code looks something like this
Code: Select all
viewer.onInteraction = async (args) => {
if (args.action == "Variables") {
await this.httpService.getData("whateverlink").toPromise().then((result) => {
const dataSet = new Stimulsoft.System.Data.DataSet();
dataSet.readJson(result.data);
report.regData("data", "data", dataSet);
report.dictionary.synchronize();
})
}
}
P.S. I'm using Angular, but it shouldn't be the reason