Author: heiko.braun(a)jboss.com
Date: 2009-11-02 06:20:53 -0500 (Mon, 02 Nov 2009)
New Revision: 870
Modified:
report-server/trunk/core/src/main/java/org/jboss/bpm/report/BirtService.java
Log:
Fix parameter extraction bug
Modified: report-server/trunk/core/src/main/java/org/jboss/bpm/report/BirtService.java
===================================================================
---
report-server/trunk/core/src/main/java/org/jboss/bpm/report/BirtService.java 2009-10-30
14:43:24 UTC (rev 869)
+++
report-server/trunk/core/src/main/java/org/jboss/bpm/report/BirtService.java 2009-11-02
11:20:53 UTC (rev 870)
@@ -171,23 +171,26 @@
paramDetails.put( scalar.getName(), BirtUtil.loadParameterDetails( task,
scalar, template, null));
}
- // update ReportReference.parameters
- 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);
- }
-
+ // cleanup
task.close();
}
+
+ // update ReportReference.parameters
+ 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);
+ }
+
+
}
@@ -299,7 +302,7 @@
String paramValue = metaData.getParameters().get(paramName);
- switch(reportParam.getDataType())
+ switch(reportParam.getDataType())
{
case DATETIME:
results.put(paramName,