Home
Analytics
Map Report Parameters to XML Data Source
plashmet
Hi,
I'm new to BIRT and I cannot figure out if I can map report parameters to XML datasets. I cant find a parameter "tab" on XML dataset like I would be able to do for regular relational dataset.
I am sure this has been asked before.
Thanks.
Find more posts tagged with
Comments
Davolio
I've never done what you're trying to do but here is what I found.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/533-parameter-driven-xml-data-source-url/#description'>Parameter
Driven XML Data Source URL - Designs & Code - BIRT Exchange</a><br />
<br />
And <br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/forum/designing-birt-reports/12100-xml-dataset-parameters.html'>http://www.birt-exchange.com/forum/designing-birt-reports/12100-xml-dataset-parameters.html</a><br
/>
<br />
Hope that's kind of useful. These guys are passing the parameters through the URL. <br />
<br />
Good luck!<br />
<br />
Dave
mwilliams
Hi plashmet,
Another possibility if that doesn't work for you would be to create a report parameter and put a filter on the dataSet based off of that parameter.
Davolio
Ah mike beat me to it .... I created an xml dataset to try that out and that was the only thing I could come up with.
Create a filter expression and you'll be able to access your parameter through the build expression dialogue box.
From there you can retrieve your parameter value and go from there.
Check my picture below.
plashmet
Thanks for your help. Got real close but no data returning now. Something very simple I am sure.
mwilliams
plashmet,
I believe the problem there is because you're using the dynamic list box. Are there too many option to enter them statically? When you filter the dataSet by 1 value....the parameter is only going to pick up the default value because the dataSet was limited to just that data. If you could enter them statically, you wouldn't have this issue. Also, creating a second dataSet to populate the parameter would work too. I'll have to look into if this is a problem when the report is deployed, or if it's just a caching issue or something in the designer.
plashmet
That didn't work either. Used static selection, but same issue. No data coming back. I read something earlier about creating a list set (?). I could also try creating another data set.
mwilliams
plashmet,
Can you attach your report design and xml file for me to test? Or at least just your report design so I can see if there is anything I can see wrong. I've done it with a simple xml file I have with static values in the parameter list and it works perfectly.
What version of BIRT are you using?
plashmet
Thanks.
I am using BIRT 2.3.1
mwilliams
plashmet,
Since I can't run your report without the xml file, I can't test...but try changing your filter operator to "IN" rather than "LIKE". See what happens.
plashmet
That was it. Use "In" instead of "Like". Also, I can dynamically update the report parameter by creating another data set.
I am very excited. Thanks for you help and Happy New Year.
Paul
mwilliams
Paul,
Excellent! No problem on the help.
Let us know if you have any other questions. Happy New Year to you as well!