Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Providing XML Data Source Path at Runtime
andrew.chu
I wrote a program to create a report using birt api.
I need to provide the data source path as you can provide the design file path and output file path.
I have same structure but differen name/path xml data source that can be used by a single report design.
Looked for a way to provide the xml data source as a parameter, so it can replace the one in the design file but was not able to find one from BIRT api.
Please help me!!
Thanks.
Find more posts tagged with
Comments
JasonW
You can do this with property binding or a script on the beforeOpen of the xml datasource in the report. Add a parameter (session variable could be used as well) to the report for the path. Then in the beforeOpen script of the datasource put something like:
this.setExtensionProperty("FILELIST", params["myxmlpath"].value );
Then in the RE API call task.setParameterValue("myxmlpath", path);
Jason
andrew.chu
Thank You.
It works beautifully.