Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
BirtEngineFactory openReportDesign file not found
Migrateduser
<p>Hello,</p>
<p>I'm able to openReportDesign and generate a Birt Report using a hard-coded path name:</p>
<p> </p>
<p>rptDesignInput = this.getClass().getResourceAsStream("/resources/report/design/db/DailyRBSFXRate.rptdesign");</p>
<p>try{</p>
<p>design=engine.openReportDesign(rptDesignInput);</p>
<p><run and render the report></p>
<p>...</p>
<p> </p>
<p>but openReportDesign fails when the path name is not hard-coded:</p>
<p><retrieve path from database into ResultSet rs></p>
<p>String x = rs.getString("<path_name>");</p>
<p>rptDesignInput = this.class().getResourceAsStream("\"/" + x + "\"");</p>
<p>logger.info("\"/" + x + "\"");</p>
<p> </p>
<p>logger display:</p>
<p>"/resources/report/design/db/DailyRBSFXRate.rptdesign"</p>
<p> </p>
<p>Hopefully there are no typos as I can't seem to cut and paste here...but the logger display and the hard-coded path name are exactly the same. I've also stored the reformatted string into a variable and used that with the same results.</p>
<p> </p>
<p>Does anyone have an idea on why the results would be different?</p>
<p> </p>
<p>Thanks,</p>
<p>Laura</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet