Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » why doesn't this BIRT program terminate?
why doesn't this BIRT program terminate? [message #506142] Wed, 06 January 2010 10:46 Go to next message
Csaba  is currently offline Csaba Friend
Messages: 24
Registered: July 2009
Junior Member
Hello Guys,

I have a BIRT program that outputs the selection choices of a report parameter defined in a report file (see the code below).
It works, it lists the (dynamic) choices, but the program is not terminated (I ran it from console and also from Eclipse IDE but couldn't terminate.) I checked it in debug mode, and all the commands are executed, there seems to be no problem.

Is this a bug of the BIRT runtime? Why doesn't it terminate?
Many thanks!
Csaba

Here is the program:
public static void main(String[] args) {
    EngineConfig config = new EngineConfig();

    config.setProperty("BIRT_HOME", BIRT_ENGINE_HOME);
    IReportEngine engine = null;
    try {
        Platform.startup(config);
        IReportEngineFactory factory = (IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
        engine = factory.createReportEngine(config);
        IReportRunnable runnable = engine.openReportDesign("./resources/reporting/test.rptdesign");
        IGetParameterDefinitionTask task = engine.createGetParameterDefinitionTask(runnable);
        for(Object object : task.getSelectionList("Foobar")) {
            IParameterSelectionChoice choice = (IParameterSelectionChoice)object; 
            System.out.println("Possible selection choice value:"+choice.getValue());				
            System.out.println("Possible selection choice label:"+choice.getLabel());				
        }
			
        Platform.shutdown();

    } catch (Exception ex) {
        ex.printStackTrace();
    }				
}
Re: why doesn't this BIRT program terminate? [message #506146 is a reply to message #506142] Wed, 06 January 2010 10:56 Go to previous message
Csaba  is currently offline Csaba Friend
Messages: 24
Registered: July 2009
Junior Member
Sorry, guys!

I forgot to call the close method for the task object.

Having called that, the program does terminate now.
Previous Topic:Using custom CSS class styling with BIRT
Next Topic:Webinar: Integrating BIRT within your Applications - Jan. 26
Goto Forum:
  


Current Time: Tue Apr 23 11:00:12 GMT 2024

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

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

Back to the top