Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Frequently Asked Questions (API)
Frequently Asked Questions (API) [message #59646] Tue, 19 July 2005 03:29
Nina Li is currently offline Nina LiFriend
Messages: 44
Registered: July 2009
Member
Greeting,

I compiled the recent Q & A in the BIRT newsgroup and divided them into
categories. You could take a look at the page, perhaps it could help you
get out of stuck :). More infomation could be found in the BIRT FAQ page.

Thanks to all the BIRT community members.

Regards,
Nina

------------------------------------------------------------ --
API issues

(Note: If you got confused about the answer, you could send E-mail
directly to the person who answered the relevant question.)


Q: Where can I find DE API Java documentation?

(Answered by rkanguri@actuate.com) The DE API JAVA docs are part of the
help inside Eclipse. After you install the BIRT plugins, go to Help->
HelpContents ->BIRT Developer Guide->Reference->API Reference -> Report
Object Model API Reference.


Q: What are the environment settings needed to access the DE API classes?

(Answered by dmichonneau@actuate.com) If you are working on a simple java
project, you need your classpath to reference the jar files of the core
and model (model.jar and core.jar) as well as their dependencies (check
other jars under the plugin folder structure of core/model). If you
downloaded the source from CVS, you will have to build the model/core
jars. If you got it from the download area, they should already be there.

If you are working on a plugin project, open plugin.xml and add core and
model plugin as required plug-ins under the dependencies tab.


Q: How can I write a report design file programmatically by BIRT API?

(Answered by nli@actuate.com) You could create a report design file in
BIRT API by following the steps in the below:
createReport( ){
//A session handle to manage all open reports
SessionHandle session = DesignEngine.newSession( null );
//Add a session (A report design handle for this report)
ReportDesignHandle reportDesignHandle = session.createDesign( );
//An element factory for creating all BIRT elements
ElementFactory elementFactory = designHandle.getElementFactory( );
//create the necessary elements for the reports
createMasterPages( );
createDataSources( );
createDataSets( );
createReportBody( );
……
...Output the report...
reportDesignHandle.saveAs( ... + "*.rptdesign" ); }
createMasterPage(){
//A design element handle for managing the Master page
DesignElementHandle masterPage = elementFactory.newSimpleMasterPage(
"Master Page" );
//Add the master page into the report
reportDesignHandle.getMasterPages( ).add( masterPage );
……
}
createDataSources( ){
//A script data source handle for managing the data source
ScriptDataSourceHandle dataSourceHandle =
elementFactory.newScriptDataSource("Data source");
...Set the property of data source...
//Add the data source into the report
reportDesignHandle.getDataSources( ).add( dataSourceHandle );
}

createDataSets( ){
//A script data set handle for managing the data set
ScriptDataSetHandle dataSetHandle = elementFactory.newScriptDataSet("Data
set");
...Set the property of data set...
//Add the data set into the report
reportDesignHandle.getDataSets( ).add( datasetHandle );
}
createReportBody( ){
//Create the contents of report
createGrid( );
createTable();
createLabel();
……
}
Previous Topic:BIRT Viewer question
Next Topic:Frequently Asked Questions (Chart)
Goto Forum:
  


Current Time: Sat Jul 27 16:13:20 GMT 2024

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

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

Back to the top