Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Retrieving multiple custom attributes in BIRT report

Hello,
I'm trying to put together some reports using BIRT, RTC 3.0.1, and the Jazz Datasource and have run into a problem with multiple custom string attributes. I have been able to retrieve one custom attribute using the STRING_KEY/STRING_VAL columns and the ENUMERATIONS table. What is the best practice for handling multiple columns; should I use a nested report for each custom attribute? I can think of a few ways to do this using a straight JDBC datasource. Is there a pretty/efficient way to do this?

Thanks,
-Ben

1 vote

Comments

I'm also trying do the same thing. Is there anyone who can advise us? Thank you.

Any answers for this?

I also want to know this

I also would like to know the answer.



One answer

Permanent link

There could be many ways to do this:

You could create a data set for each key value. So if you are fetching custom attributes att1 and att2, you end up with two data sets where you pass the hard coded value att1 as a parameter to data set 1 and the hard coded value att2 to data set 2. If you only have two custom attributes, you could use a joint BIRT data set to join the two. If you have many more, it is better to store all the data from the various data sets into one javascript data structure and then expose it using a BIRT scripted data set.

You could also fetch the key value pairs in one data set. Store the contents of the data set in a javascript data structure, then expose it to BIRT using a scripted data set that makes the custom attributes look like real columns.

Here is an example:

(work item 1, att1, val1)

(work item 2, att1, val2)

(work item 1, att2, val3)

The java script data structure to expose the above will be an array containing two objects:

[ {id: work item 1, att1: val1, att2: val3}, {id: work item 2, att1: val2, att2: null} ]

A BIRT scripted data set can easily expose the above data structure as a table with three columns.

A third way to do the above is to fetch the custom attributes individually for each work item by dynamically passing the work item id and the custom attribute key to a data set for each work item. 

1 vote

Comments

It does not seem to be trivial. Anyway thank you Rafik for the answer!

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 324

Question asked: Sep 19 '11, 2:20 p.m.

Question was seen: 7,374 times

Last updated: Jun 21 '13, 3:18 a.m.

Confirmation Cancel Confirm