Decimal Rounding in VertiGIS Reporting
Hello,
In VertiGIS Reporting I'm looking for a way to control rounding for currency values. No matter what I've tried the currency value will either round up or down to the nearest dollar and not properly display the cents. The report uses a JSON data source where a SQL query result is fed into the Run Command activity (this is setup properly). Even when I enter values in the JSON data source to preview the data in Reporting, the rounding issue still occurs. Same for running the SQL query in SQL Server Manager. This leads me to believe the rounding is happening within the report and not the SQL query.
JSON Source
[{"OBJECTID":562923,"DESCRIPTION":"REMOVE & REPLACE (CITY RESP) 4\" CONCRETE SIDEWALK","UNITSUSED":100,"UNITPRICE":7.891011,"TOTAL":789.1011},{"OBJECTID":562924,"DESCRIPTION":"TREE ROOT GRIND (CITY RESPONSIBILITY)","UNITSUSED":2,"UNITPRICE":13,"TOTAL":26}]


Any help would be appreciated!
-
I can't reproduce this using your JSON in a report that only has a single label pointing to the TOTAL field. It looks like this:
You're not doing any rounding in the text expression, are you? That should just be [TOTAL]
0 -
Berend,
I submitted a ticket with VertiGIS and was able to get to the bottom of the issue. It has to do with the Data Type that's set when the JSON Data Source is created. Depending on the numeric value you give (i.e. include a decimal or no decimal) it will parse it either as a integer or a decimal. Below is the response I got.
1 -
Thanks for the update, this can help others having the same issue
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare