Hello,
When I set the report using `setReport` method. I get this message below
Uncaught TypeError: Cannot assign to read only property 'uniqueName' of object '#<Object>
I am trying to update a report that looks like
{
"dataSource":{
"type":"csv",
"filename":"https://<path-to-remote-csv>",
"requestHeaders":{
"Authorization":"Bearer <Token>"
}
},
"options":{
"grid":{
"type":"flat"
}
},
}
with one that looks like
{
"dataSource":{
"type":"csv",
"filename":"https://<path-to-another-remote-csv>",
"requestHeaders":{
"Authorization":"Bearer <token>"
}
},
"slice":{
"rows":[
{
"uniqueName":"0_Date.Year"
},
{
"uniqueName":"0_Date.Month"
},
{
"uniqueName":"0_Date.Day"
},
{
"uniqueName":"1_Review"
},
{
"uniqueName":"2_City"
},
{
"uniqueName":"3_Type"
},
{
"uniqueName":"statement_expression"
},
{
"uniqueName":"language"
},
{
"uniqueName":"statement_topic"
},
{
"uniqueName":"statement_opinion"
},
{
"uniqueName":"sentiment"
},
{
"uniqueName":"group_topic"
},
{
"uniqueName":"group_opinion"
}
],
"measures":[
{
"uniqueName":"4_Price",
"aggregation":"sum"
},
{
"uniqueName":"group_uniq_doc_count",
"aggregation":"sum"
}
],
"flatOrder":[
"0_Date.Year",
"0_Date.Month",
"0_Date.Day",
"1_Review",
"2_City",
"3_Type",
"4_Price",
"statement_expression",
"language",
"statement_topic",
"statement_opinion",
"group_uniq_doc_count",
"sentiment",
"group_topic",
"group_opinion"
]
},
"options":{
"grid":{
"type":"flat"
}
},
"version":"2.8.12",
"creationDate":"2020-08-12T16:27:31.704Z"
}
If I remove the slice field from the second report then it works fine. Would very much appreciate any help.
Cheers,
Ali
Hi Ali,
Thank you for posting your question.
So far, we haven’t managed to reproduce the described issue. Do you think you could send us a dummy data set with which the issue is reproducible?
Looking forward to hearing from you.
Regards,
Mykhailo
Hi Mykhailo,
I was able to solve problem by making sure that I was saving a clone of the report. I used
flexmonster.setReport(JSON.parse(JSON.stringify(report)))
Cheers,
Ali