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
Chart not showing from local folder
Migrateduser
Hello,
Any help is really appreciated. I try to render a chart as rptdesign to a jsp as html.
It generates the correct html code. IE prevents of security reason the acces to the local folder.
How can I solve this problem?
Thanks.
Herbert
My code:
try {
IReportEngine engine = BirtEngine.getEngine();
if (engine != null) {
//Open the report design
IReportRunnable design = engine.openReportDesign(chartName);
//Create task to run and render the report,
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
task.setParameterValue("SCHEMA", BirtEngine.getDBSchema());
task.getAppContext().put("dashboardMemberships", dashboardMemberships); // set data
//Setup rendering to HTML
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat("html");
options.setEmbeddable(true);
options.setHtmlPagination(false);
options.setImageDirectory("c:/Spirit/ChartData");
//set this if you want your image source url to be altered
//If using the setBaseImageURL, make sure to set image handler to HTMLServerImageHandler
//options.setBaseImageURL("http://myhost/prependme?image=");
//options.setBaseImageURL("http://10.1.2.95:9080/c:/c:/Spirit/ChartData");
options.setHtmlRtLFlag(false);
options.setOutputStream(reportOutput);
//file based images
options.setImageHandler(new HTMLCompleteImageHandler());
//Web based images. Allows setBaseImageURL to prepend to img src tag
//options.setImageHandler(new HTMLServerImageHandler());
task.setRenderOption(options);
//run and render report
task.run();
task.close();
}
}
catch( Exception ex)
{
ex.printStackTrace();
}
Find more posts tagged with
Comments
There are no comments yet