...
JRRunViewer runViewerBean = new JRRunViewer(true);
//Set the multi-value parameter
Hashtable ht = new Hashtable();
//Set the multi-value mark
ht.put(APIConst.TAG_PARAM_IS_MULTIPLE_PREFIX + "$" + "Parameter1", "true");
ht.put(APIConst.TAG_PARAM_IS_MULTIPLE_PREFIX + "$" + "Parameter2", "true");
//Set the parameter value to all
//ht.put("Parameter1", new String[]{APIConst.MULTIPLE_ALL_VALUE});
//ht.put("Parameter2", new String[]{APIConst.MULTIPLE_ALL_VALUE});
//Set multiple values for the parameter. The value cannot be null.
ht.put("Parameter1", new String[]{"a", "b", "c", "d"});
ht.put("Parameter2", new String[]{"1", "2", "3", "4", "6","10", "5"});
//Pass the parameter values by the method setParamsHashtable
runViewerBean.setParamsHashtable(ht);
...
|