Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » generation in html
generation in html [message #164148] Wed, 24 May 2006 14:27
Eclipse UserFriend
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
Previous Topic:Emailing reports
Next Topic:Report Engine on 2.1
Goto Forum:
  


Current Time: Thu Oct 10 23:28:23 GMT 2024

Powered by FUDForum. Page generated in 0.02792 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top