Get Free Trial
Get Free Trial

Format object has negative value, so format changes are not saving in first column

Answered
david asked on September 16, 2019

Hi,
 
I am having trouble updating a report.
 
The report loads a JSON configuration from a database and then displays it.
 
The report is currently displaying the fiscal year as currency. After making format changes, the app saves the return of flexmonster.getReport({withDefaults: true}) back into the database.
I can change the formatting of every column except the first one, fiscal year. When I drill down into the flexmonster.getReport() object, it looks like the measure object for Fiscal Year is pointing to a format object that doesn’t exist, and therefore uses the default formatting object (the object where name = “”).

active: false
aggregation: "sum"
caption: "Fiscal Year"
format: "-160l5n5aoox800"
grandTotalCaption: "Fiscal Year"
uniqueName: "fiscal_year"

Is there any way to fix this?
 
EDIT: I was able to update the formatting by using the API to update fields in the console. After updating the view, it works. But this solution is janky and I’d love some insight on how to do this properly.

let format = flexmonster.getFormat('fiscal_year')
format.decimalPlaces=0
format.thousandsSeparator=""
format.currencySymbol="";
flexmonster.setFormat(format, 'fiscal_year')
flexmonster.refresh()

1 answer

Public
Dmytro Zvazhii Flexmonster September 17, 2019

Hello David,
Thank you for writing to us.
 
We were not able to reproduce such behavior on our side.
 
Could you please check whether you are using the latest version of the component? Here is the guideline of how to update to the latest version: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
Please make sure that cache is cleared and the flexmonster.toolbar.js is updated since it may be the cause of the issue.
 
Let us know if it helped to resolve the issue.
Regards,
Dmytro

Please login or Register to Submit Answer