How to create BIRT report with custom parameters?
14 answers
On 1/6/2010 10:53 AM, kiranrvce wrote:
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
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
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?
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?
On 1/29/2010 12:08 PM, anjalidjain wrote:
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
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
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.
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.
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.
page 1of 1 pagesof 2 pages