It's all about the answers!

Ask a question

How to create BIRT report with custom parameters?


Kiran Nagara (10741823) | asked Jan 06 '10, 6:59 a.m.
edited May 15 '14, 11:33 a.m. by Krzysztof Kaźmierczyk (7.4k373103)
Hello All,

I am trying to create some reports using BIRT in RTC, I want to include some of the custom fields, can somebody help me on the same.

Thanks,
-Kiran

14 answers



permanent link
Jean-Michel Lemieux (2.5k11) | answered Jan 06 '10, 9:36 a.m.
JAZZ DEVELOPER
If you browse to https://jazz.net/library and type "reports customer attributes" you'll find a set of videos on how to do this.
Cheers,
Jean-Michel

permanent link
Jean-Michel Lemieux (2.5k11) | answered Jan 06 '10, 11:08 a.m.
JAZZ DEVELOPER
Currently creation of new reports requires some javascript coding. The tutorial is the current state of our customization support.
Cheers,
Jean-Michel

permanent link
Kiran Nagara (10741823) | answered Jan 06 '10, 10:49 a.m.
Hi Jean,

I have gone through them, But I am not fluent in java scriting, can't we use the custom fields without java scripting?

Thanks

permanent link
Victor Campbell (3502618) | answered Jan 06 '10, 11:58 a.m.
A lot of us on our project would like to know that too. If you come across some online documentation with some examples, provide us with the links.

permanent link
James Moody (3.3k24) | answered Jan 06 '10, 3:08 p.m.
JAZZ DEVELOPER
On 1/6/2010 10:53 AM, kiranrvce wrote:
Hi Jean,

I have gone through them, But I am not fluent in java scriting, can't
we use the custom fields without java scripting?

Thanks


Many simple reports can be written without the need for writing any
javascript in the report. More complicated reports, or certain kinds of
chart/table tweaking, or cases where you need to combine/join data
without using BIRT joint data sets, require scripting to accomplish this.

(I've worked with Kiran today to help him through some initial report
writing steps).

james
RTC Reports Team Lead

permanent link
anjali jain (16) | answered Jan 29 '10, 11:56 a.m.
When i create a data set, I get work items row repeated, how do i get a distinct set of work items pulled from the data set.
I am trying to create a data set and query it based on a custom filter which can have value 1 or value 2
In case the work item has value assigned to field 1 and field 2 , it brings in that work item twice.

Also is there a place where I can get a desciption of different RTC tables and what gets stored in where?

permanent link
James Moody (3.3k24) | answered Feb 03 '10, 2:23 p.m.
JAZZ DEVELOPER
On 1/29/2010 12:08 PM, anjalidjain wrote:
When i create a data set, I get work items row repeated, how do i get
a distinct set of work items pulled from the data set.
I am trying to create a data set and query it based on a custom
filter which can have value 1 or value 2
In case the work item has value assigned to field 1 and field 2 , it
brings in that work item twice.

Also is there a place where I can get a desciption of different RTC
tables and what gets stored in where?


Hi,

You can get a description of each of the data warehouse tables here:

https://jazz.net/wiki/bin/view/Main/DataWarehouseSnapshotSchemas20

So, just to understand the case, you need to select two different custom
fields, and in the case where a work item has values for both of those
fields, you get two rows back, when you really want just one. The
behaviour is expected, because of the generic way we store custom
attributes, but you can work around this quite easily.

The simpliest thing for you to do might be to store the work items, as
well as all the custom attributes, in a javascript map, and then create
a scripted data set on that map, and create your chart/table from the
scripted data set.

So, assuming your existing data set is "A", and the new scripted data
set is "B":

In report initialize, declare a variable to hold all the data.

workItems = [];

We'll be using the work item id as the key, and an object with the
attributes as the value.
In A's onFetch, you need to look up the value from workItems to see if
it already exists, and create it if it doesn't. Roughly:

var id = row;
var workItem = workItems;
if (workItem == null) {
workItem = [];
workItems = workItem;
workItem = row;
... (fill in the other stuff like creation date, project area name,
team area name, category name, wi_type, etc).
}
Then fill in the custom attribute data that you've fetched specifically
with this row:
workItem] = row; // or BOOLEAN_VAL, or
whatever

Then, create scripted data set B, and implement its fetch method to
return one of these workItem objects, which is now all flattened out to
a single row.
Then create your chart on data set B.

Hope this helps, please let me know if this isn't clear.

james
RTC Reports Team Lead

permanent link
Piotr Anioła (11) | answered Mar 07 '11, 9:13 a.m.
Hello,
I'm facing a related issue with BIRT and RTC.
I added a custom boolean attribute to Work Item. I am able to use this attribute in a report: when I create a dataset using LIVE_WORKITEMS_CNT table I can use BOOLEAN_KEY and BOOLEAN_VALUE fields to fetch the contents of my custom attribute. It works equally well for other simple types such as integers and strings.
When I, however, create a custom attribute of the type Contributor, I am unable to see the value of this attribute anywhere in LIVE_WORKITEMS_CNT. Is there a way to use that kind of attribute to filter a dataset based on LIVE_WORKITEMS_CNT?

Thank You in advance for Your help.

permanent link
Vladimir Amelin (70472226) | answered Mar 09 '11, 7:38 a.m.
Hello,
I'm facing a related issue with BIRT and RTC.
I added a custom boolean attribute to Work Item. I am able to use this attribute in a report: when I create a dataset using LIVE_WORKITEMS_CNT table I can use BOOLEAN_KEY and BOOLEAN_VALUE fields to fetch the contents of my custom attribute. It works equally well for other simple types such as integers and strings.
When I, however, create a custom attribute of the type Contributor, I am unable to see the value of this attribute anywhere in LIVE_WORKITEMS_CNT. Is there a way to use that kind of attribute to filter a dataset based on LIVE_WORKITEMS_CNT?

Thank You in advance for Your help.


It is not possible to get the value of a contributor-type custom attributes out of LIVE_WORKITEMS_CNT.

permanent link
Vladimir Amelin (70472226) | answered Mar 26 '11, 7:12 a.m.
But it's possible to expose such data from LIVE_SNAPSHOT using com.ibm.team.workitem.WorkItem dataset.
Key is itemExtensions.key, value is itemExtensions.value.itemId.
Good luck!

Your answer


Register or 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.