@Override
    public BigDecimal evaluate(ReportParameters reportParameters) {

      Double dbq1 = reportParameters.getValue(this.q1);
      Double dbq2 = reportParameters.getValue(this.q2);

      return new BigDecimal(dbq1 + dbq2);
    }
Example #2
0
 @Override
 public Boolean evaluate(ReportParameters reportParameters) {
   Integer value = (Integer) reportParameters.getValue("field1");
   return values.contains(value);
 }
 @Override
 public Boolean evaluate(ReportParameters reportParameters) {
   return reportParameters.getReportRowNumber().doubleValue() % 2 != 0;
 }
 @Override
 public T stringToValue(String name, ReportParameters reportParameters) throws DRException {
   return stringToValue((String) reportParameters.getValue(name), reportParameters.getLocale());
 }
 @Override
 public T stringToValue(DRIValue<String> value, ReportParameters reportParameters)
     throws DRException {
   return stringToValue(reportParameters.getValue(value), reportParameters.getLocale());
 }
 @Override
 @SuppressWarnings("unchecked")
 public String valueToString(String name, ReportParameters reportParameters) {
   return valueToString((U) reportParameters.getValue(name), reportParameters.getLocale());
 }
 @Override
 public String valueToString(DRIValue<? extends U> value, ReportParameters reportParameters) {
   return valueToString(reportParameters.getValue(value), reportParameters.getLocale());
 }
 @Override
 public Integer evaluate(ReportParameters reportParameters) {
   return reportParameters.getGroupCount(groupName);
 }
 @Override
 public String format(Number value, ReportParameters reportParameters) {
   return label + currencyType.valueToString(value, reportParameters.getLocale());
 }
 @Override
 public String evaluate(ReportParameters reportParameters) {
   return StringUtils.right(String.valueOf(reportParameters.getValue("key")), 3);
 }