ReportReference ref = reports.get(templateName);
Iterator<String> paramNames = paramDetails.keySet().iterator();
while(paramNames.hasNext())
{
Map<String, Serializable> map = paramDetails.get(paramNames.next());
ReportParameter paramRef = new ReportParameter(
(String)map.get("Name"), ReportParameter.Type.valueOf((String)map.get("Type"))
);
paramRef.setDataType(ReportParameter.DataType.valueOf((String)map.get("DataType")));
paramRef.setHelptext((String)map.get("Help Text"));
paramRef.setPromptText((String)map.get("Prompt Text"));
ref.getParameterMetaData().add(paramRef);
}
}