generation in html [message #164148] |
Wed, 24 May 2006 14:27 |
Eclipse User |
|
|
|
Originally posted by: lsellam.ebusinessinformation.fr
A simple quetion :
I can easily generate pdf but i have a pb with html :
ByteArrayOutputStream outStream = null;
try
{
// Open a report design - use design to modify design, retrieve
embedded images etc.
if (!StringUtil.isNullOrBlank(reportPhysicalPath))
{IReportRunnable design = engine.openReportDesign(reportPhysicalPath);
// Create task to run the report and render the report
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
setReportParameterValues(task, design, paramValueList);
//output format, whether it is embeddable, etc
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setImageDirectory(IMAGE_DIR);
HashMap contextMap = new HashMap();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
renderContext );
task.setAppContext( contextMap );
//Set rendering options - such as file or stream output,
//output format, whether it is embeddable, etc
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputStream(outStream);
options.setOutputFormat("html");
task.setRenderOption(options);
task.run();
outStream.close();
At the last lin i have a nullPointer exception
|
|
|
Powered by
FUDForum. Page generated in 0.02792 seconds