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)
Make datastore and use it with birt servlet?
brieweb
How do you make a datastore and use it for a report you drop in the birt.war runtime servlet?
It seems that the datastore and has hard coded paths as well as reference to it in the report.
brian
Find more posts tagged with
Comments
JasonW
Brian,
You can always use the property binding feature on the datasource to set a url for the store dynamically. You could also use a bit of script in the beforeOpen to set the location:
//assume you put the profile in the resource folder
myresourcefolder = reportContext.getDesignHandle().getResourceFolder()
this.setExtensionProperty("OdaConnProfileStorePath", myresourcefolder+"/mysqlclassicprofile.txt");
or use a session variable or the realpath for any location;
var myprofile = reportContext.getHttpServletRequest().getSession().getServletContext().getRealPath("/myprofiles")+"/myprofile.txt";
this.setExtensionProperty("OdaConnProfileStorePath", myprofile);
If you do this you may want to verify the report is deployed versus using it in the designer:
if( !reportContext.getHttpServletRequest().getAttribute("attributeBean").isDesigner() ){
}
Jason