NumericDDMFormFieldTypeReportProcessor extends TextDDMFormFieldTypeReportProcessor { protected String formatBigDecimal(BigDecimal bigDecimal) { StringBundler sb = new StringBundler(3); String bigDecimalString = bigDecimal.toString(); String[] bigDecimalStringParts = bigDecimalString.split("\\."); sb.append(bigDecimalStringParts[0]); if (bigDecimalStringParts.length > 1) { String decimalPart = bigDecimalStringParts[1]; int decimalPartIndex = decimalPart.length() - 1; while ((decimalPartIndex > 0) && (decimalPart.charAt(decimalPartIndex) == '0')) { decimalPartIndex--; } if (decimalPartIndex > 0) { decimalPart = decimalPart.substring(0, decimalPartIndex + 1); sb.append(StringPool.PERIOD); sb.append(decimalPart); } } return sb.toString(); }  @Override JSONObject process(
			DDMFormFieldValue ddmFormFieldValue, JSONObject fieldJSONObject,
			long formInstanceRecordId, String ddmFormInstanceReportEvent);  }
@Test public void testFormatBigDecimal() { Assert.assertEquals( "12", _numericDDMFormFieldTypeReportProcessor.formatBigDecimal( new BigDecimal("12.00000000000000"))); Assert.assertEquals( "12.00000000000001", _numericDDMFormFieldTypeReportProcessor.formatBigDecimal( new BigDecimal("12.00000000000001"))); Assert.assertEquals( "12.000000001", _numericDDMFormFieldTypeReportProcessor.formatBigDecimal( new BigDecimal("12.0000000010000"))); }