Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Accessing dynamic parameter values
Monma
Using birt 2.2.2
I have defined a parameter as dyamic and bound it to a dataset. In a script defined in the report initialize event I can access the parameter as follows:
params["myparam"].value
this allows to access the value selected by the user. But I really wanted to access the whole list of values stored in the combo box. Is there a way for me to do so?
Your help is appreciated.
Find more posts tagged with
Comments
mwilliams
Hi Monma,
If your report parameter is grabbing the values from your dataSet, you should be able to just grab the values in your dataSet as well. You wouldn't need to access them through the parameter. If I'm misunderstanding your question, let me know.
Monma
The reason I need to do this is because I need to get that information during the design phase so I can build tables on the fly depending on this information.
It seems that ComboBox work this way but listbox will allow passing multiple values.
I have another question I was planning to have all the tables access the same dataset and add a filter so each table may show different information. Will this cause multiple queries or only. My guess it that only one query will be generated although each table will bound to that data set.
Thanks for all the help.
mwilliams
Monma,
I guess I might be confused on the parameter question. You want to access all the values that the user has to select from? Or you want to access the values the user selected?
As for the multiple tables using a single dataSet, I believe that in 2.2.2, the query will be run for each item that it bound to a dataSet, so you'd be better off building a specific SQL limited query for each table. In 2.3.0 or 2.3.1, the caching was improved to only run the query once if using the same data to avoid redundancy.
Hope this helps.
Monma
I wanted to select all the values that the user has access to. I am kind of using this as a hack to pass the metadata that will be used to build the tables.
As for the query I usually use a stored procedure to access the data I could modify the sp call depending on the table.
So there is no way for me to bring in all the data and use it for the different tables. The reason I need this that this is a denormalized table that contains all the instances of the different objects (identified by a type). This table has a maximum number of columns but each type may use only certain columns and certain row. This is why I will be building the tables dynamically. There can be up to 500 types this is why it would not make sense to build each table manually.
For illustration purpose:
1 - Object metadata table:
ObjectTypeId, NumAttributes, AttrSize
1, 3, 4:8:6
2, 5, 8:4:8:5:24
2 - Object data tables:
ObjectTypeID, Col1, Col2, Col3, Col4, Col5
1, 'aaaa', '2009-08-01', 'abc123', null, null
1, 'bbbb', '2009-08-08', 'cde456', null, null,
2, '2009-08-08', '1234', 'abcdefgh', '99.80', '123-abxdfgert-QP'
2, '2009-08-08', '1234', 'abcdefgh', '99.80', '123-abxdfgert-QP'
In the report I will read the metadata table and generate 2 tables one for Object 1 that has 3 columns with sizes 4, 8 and 6. And another for table 2 with sizes 8, 4, 8, 5 and 26.
Another think I will need is to post to the webviewer not use a get. Because since there are up to 500 types the metadata table will have a substantial size. If I do so I take it I can use a form and define the fields and give them the names which will be used as params["MyName"] right?
Thanks you have my gratitude.
Monma
Micheal, let me know if my reply is not clear.