[BIRT]-創(chuàng)建一個report engine
l 每個應(yīng)用只需創(chuàng)建一個ReportEngine的實(shí)例
l ReportEngine的構(gòu)造函數(shù)要傳入一個EngineConfig作為參數(shù),如果參數(shù)為null,則一個默認(rèn)值的ReportEngine被創(chuàng)建。
l 退出時,應(yīng)用應(yīng)該調(diào)用destroy()來卸載外掛以及刪除臨時文件
l 使用report engine有以下幾個主要步驟:
a) 創(chuàng)建一個EngineConfig來設(shè)置report engine的選項
b) 創(chuàng)建一個ReportEngine類的實(shí)例
c) 你可以用這個對象去進(jìn)行多種任務(wù)
d) 使用ReportEngine的一個openReport( )方法來打開一個report design文件
e) 使用IgetParameterDefinitionTask來獲得report參數(shù)的信息
f) 使用IrunAndRenderReportTask運(yùn)行并轉(zhuǎn)換一個report到一個輸出格式
g) 調(diào)用你的report engine的destroy( )方法
l EngineConfig:The EngineConfig class wraps configuration settings for a report engine. It allows a developer to specify where to look for engine plug-ins and data drivers, and to add an application-wide scriptable object.
l IReportRunnable:為了使用report engine,你必須首先調(diào)用openDesign( )方法來打開report設(shè)計文件,這些方法返回一個IreportRunnable實(shí)例來代表report設(shè)計文件的engine’s view。使用IreportRunnable做以下任務(wù):
a) Get parameter data
d) Get images embedded within the report design
l IEngineTask:該類提供一個管理腳本上下文以及report locales的框架,它從ReportEngine的工廠方法中創(chuàng)建,需要參數(shù):IreportRunnable對象、a scripting context, and a locale。
posted on 2005-08-22 23:19 fisher 閱讀(945) 評論(0) 編輯 收藏 所屬分類: Programing