Need a special offer?Find out if your project fits.
+

Preset Slice Expands in Angular

Answered
Rudolf Brink asked on October 8, 2020

Hi there,
I have a preset report variable named 'myreport' in angular with slice/expands information like this:

"expands": {
"rows": [
{
"tuple": [
"region.[southern europe]"
]
},
{
"tuple": [
"region.[southern europe]",
"country.[france]"
]
}
]
}

 
Using .flexmonster.setReport(this.myreport) it does not take in consideration my expands settings.
Is there any method I should use to ensure expands are set correctly once updateData has been called?
Many thanks.
Regards.
 
RB
 

2 answers

Public
Rudolf Brink October 8, 2020

Also. if I do

var report = this.pivot.flexmonster.getReport();
this.expands = report.slice

report.slice.expands return the error attached

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 9, 2020

Hello, Rudolf,
 
Thank you for contacting us.
 
Our team wants to inform you that we did not manage to reproduce the issue with ignored expands.
Please provide us with an example in which this behavior could be observed. It will allow us to perform the research on our side.
 
Concerning the updateData API call, we want to explain that it only updates the dataSource object, whereas the rest of the configuration, including expands, stays the same. It means no additional manipulations are required if the updateData method is used.
 
As for the error illustrated on the screenshot, we would like to explain the following:
The getReport() API call can return either a JSON object or a string. Therefore, without an explicit type definition of the returned data, it is impossible to infer the returned object's properties.
Please consider adding an explicit type definition and the corresponding casting:

var report: Flexmonster.Report = <Flexmonster.Report>this.pivot.flexmonster.getReport();
this.expands = report.slice.expands;

Please let us know if it helps.
 
We are looking forward to seeing the example demonstrating the issue with expands.
 
Best regards,
Illia

Please login or Register to Submit Answer