How to split BIRT parameter values
Hi,
I am using BIRT 2.6.2 version. I am using cascading parameter and have three parameters to pass. Project area, Timeline and Iteration. Iteration is multi-selection. I need the ITERATION_ITEMID to be used in Javascript for data processing. But I am unable to get the multi-selected ITERATION_ITEMIDs. It is giving result as a single string with quotes (') and each ITERATION_ITEMID separated with commas (,). I am able to remove the quotes based on https://jazz.net/forum/questions/90236/how-to-enable-multi-select-parameters-in-birt-for-rtc-reporting . But still struggling to split the multiple ITERATION_ITEMIDs separated by comma. As mentioned in the link I used split, but giving some junk value. Basically I need to check the work item record against each ITERATION_ITEMID and if it matches I need to process. Any help on this is highly appreciated.
|
One answer
Hi Tojan,
I think I had a similar issue in my case the name of the parameter was "GEO": importPackage(Packages.java.util.*); geosSet = new java.util.HashSet(); try { geosTable = params["GEO"].value.replace(/'/g,"").split(","); // print the results for (i=0; i < geosTable.length;i++) { geosSet.add(geosTable[i]); // Set the GEO label header if(i > 0) _GEO += " & "; _GEO += enums["Region"][geosTable[i]]; }BTW what do you mean by "junk value"? Best regards, Tad Comments
Tojan John
commented Nov 28 '14, 3:12 a.m.
Hi Tad,
Thanks for you help. Still I am getting same result. Iterations are appearing as "Ljava.lang.Object;@35233523" once I split.
Tadeusz Janasiewicz
commented Nov 28 '14, 8:33 a.m.
Hi Tojan,
Hi Tojan,
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.