diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadReportingServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadReportingServiceImpl.java index 5508871fe..7fec70f69 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadReportingServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/service/ReadReportingServiceImpl.java @@ -323,7 +323,7 @@ public class ReadReportingServiceImpl implements ReadReportingService { ReportParameterDefinition paramsDefinition = report.getParameterDefinition(); /* - * only allow integer and string parameter types and assume all + * only allow integer, long, date and string parameter types and assume all * mandatory - could go more detailed like Pawel did in Mifos later * and could match incoming and pentaho parameters better... * currently assuming they come in ok... and if not an error @@ -337,9 +337,10 @@ public class ReadReportingServiceImpl implements ReadReportingService { Class clazz = paramDefEntry.getValueType(); logger.info("addParametersToReport(" + paramName + " : " + pValue + " : " + clazz.getCanonicalName() + ")"); - if (clazz.getCanonicalName().equalsIgnoreCase("java.lang.Integer")) rptParamValues.put(paramName, Integer.parseInt(pValue)); + else if (clazz.getCanonicalName().equalsIgnoreCase("java.lang.Long")) + rptParamValues.put(paramName, Long.parseLong(pValue)); else if (clazz.getCanonicalName().equalsIgnoreCase("java.sql.Date")) rptParamValues.put(paramName, Date.valueOf(pValue)); else