Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Upgrading report definitions for newer BIRT version?
Upgrading report definitions for newer BIRT version? [message #630751] Mon, 04 October 2010 19:20 Go to next message
Jim Garrison is currently offline Jim GarrisonFriend
Messages: 57
Registered: July 2009
Member
I have a set of report definitions (rptdesign xml files) that were developed under BIRT 2.5.0. After upgrading to 2.6.1, there are appearance changes such as


  1. Some (not all) subheaders and footers no longer display/print
  2. In a bubble chart, bubble sizes are much larger than they were in 2.5.0


I've tried opening and saving the report definitions in the newer report designer but it doesn't change anything. Is there a procedure for upgrading older report definitions to work with the newer BIRT?
Re: Upgrading report definitions for newer BIRT version? [message #630775 is a reply to message #630751] Mon, 04 October 2010 21:40 Go to previous messageGo to next message
Jim Garrison is currently offline Jim GarrisonFriend
Messages: 57
Registered: July 2009
Member
I figured out that "Save As..." will update the rptdesign file to 2.6.1 compatibility. However I have a large number of such files. Is there a way to automate the upgrade process?
Re: Upgrading report definitions for newer BIRT version? [message #630934 is a reply to message #630775] Tue, 05 October 2010 15:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jim,

I do not think we have anything to do this quickly, but you could write
a simple DE API app that opens all the rptdesigns in a folder and does
the save.

Jason

On 10/4/2010 5:40 PM, Jim Garrison wrote:
> I figured out that "Save As..." will update the rptdesign file to 2.6.1
> compatibility. However I have a large number of such files. Is there a
> way to automate the upgrade process?
Re: Upgrading report definitions for newer BIRT version? [message #631001 is a reply to message #630934] Tue, 05 October 2010 19:48 Go to previous messageGo to next message
Jim Garrison is currently offline Jim GarrisonFriend
Messages: 57
Registered: July 2009
Member
That's the direction I'm headed

I'm a strong Java developer but a complete noob with regards to Eclipse plugins. I've read a lot of the "getting started" material on the Eclipse site, but there seems to be quite a bit of undocumented "plugin lore" that one has to learn. For example, the docs are all written from the perspective of adding new functionality, with little covering the USE of existing commands. I could not find a list anywhere of the available org.eclipse.ui.* command IDs.

Is there anything with examples of using the PDE API to do things like


  • enumerate the files in a directory
  • iterate over the list, opening each one in the report designer, then issuing a "Save As..." command

Re: Upgrading report definitions for newer BIRT version? [message #631195 is a reply to message #631001] Wed, 06 October 2010 14:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jim,

I was just thinking to do it with a command line app like the following:


import java.io.File;
import java.io.IOException;

import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.model.api.DesignConfig;
import org.eclipse.birt.report.model.api.IDesignEngine;
import org.eclipse.birt.report.model.api.IDesignEngineFactory;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.SessionHandle;
import org.eclipse.birt.report.model.api.activity.SemanticException ;

import com.ibm.icu.util.ULocale;

/**
* Simple BIRT Design Engine API (DEAPI) demo.
*/

public class FileIterSave
{

public static void main( String[] args )
{
try
{
updateReports( );
}
catch ( IOException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch ( SemanticException e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}


static void updateReports( ) throws IOException, SemanticException
{
// Create a session handle. This is used to manage all open designs.
// Your app need create the session only once.

DesignConfig config = new DesignConfig( );

config.setBIRTHome("C:/birt/birt-runtime-2_5_1/birt-runtime-2_5_1/ReportEngine ");
IDesignEngine engine = null;
try{


Platform.startup( config );
IDesignEngineFactory factory = (IDesignEngineFactory) Platform
.createFactoryObject(
IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );
engine = factory.createDesignEngine( config );

}catch( Exception ex){
ex.printStackTrace();
}


SessionHandle session = engine.newSessionHandle( ULocale.ENGLISH ) ;

ReportDesignHandle design = null;
try{

File f1= new File("C:/work/TestReports/");

File []fileList = f1.listFiles();

for(File f2:fileList){

System.out.println(f2.getPath());

design = session.openDesign(f2.getPath());

design.save();

design.close( );

}

Platform.shutdown();

}catch(Exception e){
e.printStackTrace();
}
System.out.println("Finished");

// We're done!
}


}

Jason
n 10/5/2010 3:48 PM, Jim Garrison wrote:
> That's the direction I'm headed
>
> I'm a strong Java developer but a complete noob with regards to Eclipse
> plugins. I've read a lot of the "getting started" material on the
> Eclipse site, but there seems to be quite a bit of undocumented "plugin
> lore" that one has to learn. For example, the docs are all written from
> the perspective of adding new functionality, with little covering the
> USE of existing commands. I could not find a list anywhere of the
> available org.eclipse.ui.* command IDs.
>
> Is there anything with examples of using the PDE API to do things like
>
> enumerate the files in a directory
> iterate over the list, opening each one in the report designer, then
> issuing a "Save As..." command
>
>
Re: Upgrading report definitions for newer BIRT version? [message #631227 is a reply to message #631195] Wed, 06 October 2010 15:55 Go to previous message
Jim Garrison is currently offline Jim GarrisonFriend
Messages: 57
Registered: July 2009
Member
Cool. So you're running the designer "headless".

I've actually dipped my toe into the Plugin Development waters and now see a whole bunch of potential uses for a custom plugin, so I'm going to pursue that avenue.

It's nice to know that BIRT can be run headless, and I'll keep that option in mind.

Thanks!
Previous Topic:Cannot set Shared Resources folder
Next Topic:use Hibernate connection pool
Goto Forum:
  


Current Time: Thu Apr 25 14:17:38 GMT 2024

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

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

Back to the top