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?
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?

Accepted answer

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:
The easy approach is to create a simple Jazz data set ("Country") ENUMERATIONS, thus:
- Make PROJECT_AREA_ITEMID a parameter defaulted to '{Current Project Area}'
- Make ENUMERATION_ID a parameter defaulted to 'Country'
-
Select columns LITERAL_NAME and LITERAL_ID
- 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:
- Create the "Country" data set as above but with PROJECT_AREA_ITEMID as a selected column
- Create a data set ("ProjectArea")
- Join "Country" and "ProjectArea" using PROJECT_AREA_ITEMID into a new data set ("ProjectAreaCountry")
- Create a cascading parameter group based on this data set
- Add a parameter using PROJECT_AREA_NAME and PROJECT_AREA_ITEMID
- Add another parameter using LITERAL_NAME and LITERAL_ID
One other answer

A few thoughts:
- Which table(s) is the data set based on and what are the fields?
- Is 'Country' the enumeration type name or id?
- Where is projectArea defined? - I don't think any initialisation is possible before parameter selection
-
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
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?