From Documentation

Jump to: navigation, search

  • Author
    Danilo de Sousa, Developer, Banco Comercial e de Investimentos (BCI).
  • Date
    July 07, 2009
  • Version



Getting start

  1. Download and unzip it to a directory.
  2. Use Eclipse to import the project using [Import Existing Project]

Project folder:

|-- src
|---- com/dsousa/birt/
|---- com/dsousa/birt/servlet/
|---- com/dsousa/zk/controller/
|-- WebContent
|---- META-INF
|---- WEB-INF
|------ classes
|------ lib // copy libs from zk and from $BIRT$/WebViewerExample/WEB-INF/lib
|------ platform // copy from $BIRT$/WebViewerExample/WEB-INF/platform
|-------- configuration
|-------- plugins
|------ zk.xml
|------ web.xml
|---- Reports
|---- index.zul


Lets see each file. , and You can find in BIRT Examples

import org.zkoss.zk.ui.Components;
import org.zkoss.zk.ui.ext.AfterCompose;
import org.zkoss.zul.Iframe;
import org.zkoss.zul.Window;

public class ReportController extends Window implements AfterCompose
	private static final long serialVersionUID = 1L;
	private Iframe iframe;

	public void afterCompose()
		Components.wireVariables(this, this);
		Components.addForwards(this, this);

	public void onClick$btReport()
		String url = "/run?__report=test.rptdesign";





<window title="BIRT and ZKOSS" border="normal" id="main"
	use="com.dsousa.zk.controller.ReportController" width="700px"	height="550px">

	<vbox width="100%" height="100%">		
		<iframe id="iframe" width="680px" height="100%" />
		<button id="btReport" label="Run report" />


The Result

If you run the application successfully, simply clicks the button, and you shall see the result.
Birt result.png

You can create your own report ( test.rptdesign ) to test.

Copyright © Danilo de Sousa. This article is licensed under GNU Free Documentation License.