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)
Dynamic parameter linked to parametrized dataset
rkadlec
Hello!<br />
I am using a dynamic parameter (String, combobox) linked to a dataset binded to xml datasource.<br />
The user have to choose one of the values from the combobox.<br />
The content of the combobox is filled from the dataset. This parametrized datased depends on one of the parameter the user have to enter (the parameter is a part of the url containing the xml resource).<br />
<br />
So, when the user opens the report <strong class='bbc'>for the first time</strong> in BIRT Viewer (2.6.1), the <strong class='bbc'>listbox is filled correctly</strong>.<br />
<br />
When the user opens the parameter page <strong class='bbc'>for the second time</strong> after the report was rendered, the listbox is still filled with the <strong class='bbc'>old values</strong>.<br />
But the report parameters are changed. I tested, that the dataset contains correctly another rows (I put some table with the content of this dataset on the report too).<br />
<br />
It seems, that <strong class='bbc'>BIRT Viewer fills the listbox on the parameter page only once</strong>.<br />
I tried to enter some logs in the getSelectionValueList event of the dynamic parameter, but the event was called only once. Another parameter events (getDefaultValueList and validate) are called repeatedly.<br />
<br />
I tested a hyperlink to the same report too. With the hyperlink works all fine, the report becomes its parameters and the listbox on the parameter page is refilled with values according with this parameters.<br />
<br />
<strong class='bbc'>Is there some possibility to enforce, that the list of parameter values is always fresh filled from the dataset?</strong><br />
<br />
Thanks, rk.
Find more posts tagged with
Comments
mwilliams
How does the user change the parameter that is used in the XML resource URL?
rkadlec
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76317" data-time="1303920093" data-date="27 April 2011 - 09:01 AM"><p>
How does the user change the parameter that is used in the XML resource URL?<br /></p></blockquote>
<br />
The user selects the parameter from the combobox in the parameter page.<br />
<br />
What's the issue:<br />
There is only one user parameter in the entire report. This parameter defines the position in a tree of the organization structure.<br />
At the begining the user see data from his own department (default parameter value).<br />
When he opens the parameter page he can choose some subdepartment from the combobox. The list of subdepartments comes from the parametrized datasource. The datasource parameter is binded to the same department parameter.<br />
<br />
After he changed the department, the report is shown. After that, when he opens the parameter page, he will see subdepartments of the previous selected department in the parameter page.<br />
<br />
So it is some drill down issue driven through only one report parameter.<br />
The combobox contains the upper department too, so the user can also drill up.<br />
<br />
Thanks, rk
mwilliams
Ah, gotcha. Yeah, you'd have to do a drill through for this. As you say, the parameter page doesn't rerun based on the last selected value. The same selections will be available if you just "redisplay" the parameter page. Either way, you're re-running the report, so doing a drill through shouldn't be a big deal. You can always add hyperlinks to your report design to allow the user to drill down into the report. You could also include another link on your page that says "back" or something and set the drill through on this element to go back up to the last level on reload.
Muzeeb9
hello,
I have one parameter with dynamic values.and i have another parameter with dynamic values,
but the second parameter suppose to populate based on the first parameter value.
Is it possible,if it please give me hint.
And the second parameter values are suppose to come from dataset with first parameter.
thanks
mwilliams
You should create a parameter dataSet that brings in both fields, then create a cascading parameter group and create your two parameters. The list box for the second parameter should only show the values that are associated with the first parameter chosen. Hope this helps.
Muzeeb9
Thanks mwilliams
I did it.
Once again thanks
Muzeeb.
Muzeeb9
Hello,
I have a table binding with one dataset but on runtime, i need one column value suppose to come from another query(not from other dataset) is it possible .
please let me know.
Thanks
mwilliams
You can create another dataSet to run the query to pull in the value you're wanting and use dataSet parameter markers '?' in your query to mark the parameters you need to pass from your current table, to get this value. Then, you can embed an element bound to this dataSet into your current table and use the dataSet parameter binding feature (on the binding tab of the property editor) to pass the necessary values from the outer table to the inner query to get the correct value. Hope this helps.
Muzeeb9
Hello,
I am not able to understand what exactly you are saying,pleas give me one example related to this issue.
Thanks
Muzeeb.
mwilliams
What's your BIRT version? I'll make an example for you.