2
votes

I'm new to BIRT and managed to create some reports using Eclipse. I can see the report through the "BIRT Viewer" from Eclipse.

But I couldn't deploy the report outside the Eclipse. The documentation describes the "birt.war" to be deployed to the application/web server prior to deploy the reports.

From where can I find the BIRT runtime which is supposed to have the "BIRT viewer".

Thx in advance,

7

7 Answers

5
votes

The BIRT runtime must be downloaded seperatly, you can download it on the eclipse page:

http://download.eclipse.org/birt/downloads/#runtime

You will find the birt.war inside the archive.

1
votes

The last version for birt runtime it's here http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-4_4_2-201502171805/birt-runtime-4_4_2-20150217.zip After download you put in the .war all the .rptdesign files and deploy in you java server. For example: In tomcat is webapps folder and in wildfly is standalone\deployments. You can see in the url http://localhost:8080/birt/frameset?__report=YOU_REPORT.rptdesign

1
votes

You could use BIRT Runtime or in the other hand you've the process for running from a java class. In this method you don't need to use the BIRT Runtime, you just need to add the .jar files to the project in the documentation you'll see more information.

Documentation from BIRT: http://www.eclipse.org/birt/documentation/integrating/reapi.php

Just to start you will need to understand that the Runtime in Java Class is called EngineConfig().

EXAMPLE:

    try{
    final EngineConfig config = new EngineConfig( );
    //BIRT provides two ways of doing the reports externally
    //1.- BIRT Runtime is kind of difficult to configure
    //2.- POJO It uses classes into a Java class (You need to import the emitters from the format you'll use and other libraries.



    //config.setEngineHome( "C:\\birt-runtime-2_6_2\\birt-runtime-2_6_2\\ReportEngine" );
    config.setLogConfig("c:/temp", Level.FINE);

    Platform.startup( config );
    //If using RE API in Eclipse/RCP application this is not needed.
    IReportEngineFactory factory = (IReportEngineFactory) Platform
            .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
    IReportEngine engine = factory.createReportEngine( config );
    engine.changeLogLevel( Level.WARNING );
}catch( Exception ex){
    ex.printStackTrace();
}
// Run reports, etc.
...

//On the page it's the explanation to create the container and the properties for the report, like the selection of the rptdesign to be used, the parameters, the outputfile path, outputfile format, etc.
//IRunTask and IRunandRenderTask are the method to send the options to the Runtime class that will get the report, output, etc. 
//EXACTLY ON THE EMITTERS CONFIGURATION'

// destroy the engine.
try
{
    engine.destroy();
    Platform.shutdown();
    //Bugzilla 351052
    RegistryProviderFactory.releaseDefault();
}catch ( EngineException e1 ){
    // Ignore
}
1
votes

To whomever coming here for using BIRT in production and/or included in your dependencies:

The only valid jar-option for you is version 4.4.2. Both 4.6.x and 4.5.x include bugs that prevent correct deployment and functionality. Older versions than 4.4.2 lack necessary features.

Click here to check out your build management link on mvnrepository.com.

0
votes

I recommmend to include the runtime into your web projects as a maven dependency. This way you have full control and seamless integration.

<dependency>
    <groupId>org.eclipse.birt.runtime</groupId>
    <artifactId>org.eclipse.birt.runtime</artifactId>
    <version>4.4.1</version>
</dependency>
0
votes

Make sure that you change the genReport.bat -

genReport.bat Changes

0
votes

please download BIRT ENGINE and deploy it in your server . and by changing .BAT file you make it flexible. i hope it helps you