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

Using custom attribute as a parameter in BIRT

Hello,
I would like to create the report where you can select custom attribute as a parameter. I found the video from Rafik: http://www.youtube.com/watch?v=8q29We9QoHE

I have created dataset called countries
Now my issue is following: the list of the countries is empty. It is possibly because the variable projectArea has not been initialised yet.

Attaching my dataset params.
Any ideas? dataset params

1 vote


Accepted answer

Permanent link
You can't use scripting like this in setting up parameters.

The easy approach is to create a simple Jazz data set ("Country") ENUMERATIONS, thus:
  1. Make PROJECT_AREA_ITEMID a parameter defaulted to '{Current Project Area}'
  2. Make ENUMERATION_ID a parameter defaulted to 'Country'
  3. Select columns LITERAL_NAME and LITERAL_ID
  4. Create a parameter based on this data set

In theory, the following should work but ENUMERATIONS seems to need an actual PROJECT_AREA_ITEMID parameter to work

If you want to select Project Area, you will need to do the following:

  1. Create the "Country" data set as above but with PROJECT_AREA_ITEMID as a selected column
  2. Create a data set ("ProjectArea")
  3. Join "Country" and "ProjectArea" using PROJECT_AREA_ITEMID into a new data set ("ProjectAreaCountry")
  4. Create a cascading parameter group based on this data set
  5. Add a parameter using PROJECT_AREA_NAME and PROJECT_AREA_ITEMID
  6. Add another parameter using LITERAL_NAME and LITERAL_ID
Krzysztof Kaźmierczyk selected this answer as the correct answer

1 vote

Comments

Hi Bill,
you are awesome! Thanks for your help!


One other answer

Permanent link
A few thoughts:
  1. Which table(s) is the data set based on and what are the fields?
  2. Is 'Country' the enumeration type name or id?
  3. Where is projectArea defined? - I don't think any initialisation is possible before parameter selection
  4. You could default Project Area to the default project area or you could set up a cascading parameter so that project area and enumeration were linked

0 votes

Comments

Hello Bill,
1. I wanted to use ENUMERATIONS table name
2. My custom attribute which I would like to set as parameter is Country which is enumeration filed (enumeration id is 'Country').
3. Here is how I define project area:
It is set as script executed onFetch for table PROJECT_AREA. Here is the script:
projectArea = row["PROJECT_AREA_ITEMID"];
4. How to do that? Could you elaborate it?

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
× 11,050
× 324
× 230

Question asked: May 16 '13, 10:54 a.m.

Question was seen: 9,249 times

Last updated: May 21 '13, 9:14 a.m.

Confirmation Cancel Confirm