It's all about the answers!

Ask a question

BIRT Avoid Table Join and use Scripted Datasource and Java Script Instead

Erwin Kunz (94686485) | asked Oct 24 '12, 3:00 p.m.
"Avoid Table Join and use Scripted Datasource and Java Script Instead" was what I heard from IBM Development. Unfortunately I have no clue how to do it.

My todays Issue.
I have added some custom field of type contributor to my work item and would like to present them on a report. For other fields like enumeration or state I load the items filtered by WI_ITEMID or PROJECT_AREA_ID with Total.count() and prepare an array where I can later on access my data.
But for Contributor I'm not able to filter and would load all 1500 items.

My todays solution is to inner join CONTRIBUTOR with WI_EXTENSION (or similar) table. Works fine but not very elegant. An there is more to come and I'll have to join other tables. Performance going bad :-)

So, my question is: how can I select the 5 CONTRIBUTOR_NAME out of the CONTRIBUTOR table, when I have a area with the 5 CONTRIBUTOR_ID 

I did find different tutorials or examples of how to use Scripted Datasource. But none showing me how to get datas from an other table by scripting .
e.g select state, due date from all children of current Item

Any example, tutorial, hint would be welcome

PS: we use and soon

Vladimir Amelin commented Oct 25 '12, 3:03 a.m.

Usually I have to store all pairs ID-NAME from Contributor table and then use only selected ones (5 in your case). There is no way to get data from "other" data set. 

Accepted answer

permanent link
Vladimir Amelin (70472226) | answered Nov 26 '12, 9:59 a.m.
However, you can try to "remember" those 5 contributors in array and then use it as Advanced Data Set parameter (with IN clause).
Erwin Kunz selected this answer as the correct answer

One other answer

permanent link
Erwin Kunz (94686485) | answered Nov 26 '12, 9:48 a.m.
Answer from Vladimir seems to be the right one :-(

Vladimir Amelin commented Feb 04 '13, 3:28 a.m.

Only disadvantage is that you might run into scalability problems when such constructed query becomes too big.

Your answer

Register or to post your answer.