untitled

Similar documents
移民資料

I/O Files讀寫檔案:

個人教室 / 網路硬碟

untitled

了 立 連 立 量 領 來 例 蘭 便 不 數 不 論 更 更 更 力 更 參 例 來 例 見 量 度 量 量 參 論 量 行 量 量 瑩 理 來 錄 量 量 不 力 省 力 立 力 量 量 量 了 量 便 錄 錄 錄 料 說 省 6

untitled

untitled

人身保險業務員資格測驗方案

untitled

untitled

行政院國科會九十一年度專題研究

1

PATENT PROSECUTION

untitled

untitled

untitled

untitled

untitled

台南縣全民學區數位學習課程進階班—PhotoImpact 10

第五章 實例個案

廉 樂 不 廉 倫 理 廉 倫 理 領 不 參 領 不 若 不 不 不 不 利 聯 行 李 聯 例 律

untitled

廢證相關作業

untitled

見 例 年 例 利 不 料 林 不 立 理 不 念 類 理 利 了 路 來 行 來 行 立 見不 立 亂 不 理 立 來 2

untitled

untitled

第三章 我國非營業特種基金制度及運作現況

untitled

untitled

untitled

依據教育部八十九年 月 日臺(八九)技(二)字第 號函

台灣經濟新報資料庫

中華民國第45屆中小學科學展覽會

國立陽明大學輻射防護計畫書

untitled

untitled

大陸黨報集團化發展之研究

untitled

untitled

電腦組裝訓練

臺灣地區的警察教育現況與展望

untitled

中華人民共和國殘疾人保障法(2008年修訂)

untitled

說 列 流 不 不 理 料 理 路 數 錄 路 料 料 錄 路 列 來 料 便 利 行 狀 路 II

untitled

untitled

龍華科技大學

untitled

untitled

公立學校教職員成績考核辦法修正草案總說明

untitled

地方公共服務績效比較評量之探討—標竿學習策略的觀點

第五章 鄉鎮圖書館閱讀推廣活動之分析

untitled

untitled

untitled

PowerPoint 簡報

吃寒天真的能減肥嗎

94年度學習障礙補救教學進階研習

untitled

untitled

untitled

untitled

2011台灣高中職專題暨小論文競賽

微處理機實習期末專題

最即時的Sybase ASE Server資料庫診斷工具

untitled

untitled

untitled

untitled

兼營營業人營業稅額 計算辦法及申報實務

untitled

untitled

十四、特殊需求的嬰兒

路 律 易 料 讀 料 立 料 來 路 行 路 路 166 ( 路 率 12.76%) 551 ( 率 78.71%) 717 ( 率 35.85%) 4-1 力 力 路 行 ( 連 ) ( ) 量 數 識 理 不 北 理 度 度 異 女 例 女 數 4-1 女 數 33

WTO/TBT重要通知

國立政治大學新研所碩士在職專班

我最大的一次震驚,來自於不同區域客家人 客家人是邊陲

untitled

untitled

九十三年第三期檔案管理工作研習營學員建議事項答覆情形彙整表

untitled

untitled

untitled

untitled

untitled

「行政院及所屬各機關出國報告綜合處理要點」

untitled

untitled

untitled

《摘要》

untitled

untitled

untitled

編者的話

untitled

untitled

untitled

Transcription:

How to using M-Power Report API M-Power Report API 力 了 M-Power Report -- Java (Library) M-Power Report API 行 Java M-Power Report M-Power Report API ( 30 ) PDF/HTML/CSV/XLS JPEG/PNG/SVG 料 料 OutputStream OutputStream email email 列 列 力 Page 1 of 13

M-Power Report API 行 M-Power Report API Java Sun J2SE Software Development Kit (SDK) 行 行 Java SDK Sun J2SE 15 Windows NT 40 SP6 Windows 2000 Acrobat Reader 5x ( PDF http://wwwchinese-tadobecom/products/acrobat/readstep2html ) Acrobat SVG Viewer 30 ( SVG http://wwwadobecom/svg/viewer/install/mainhtml ) 力 Page 2 of 13

M-Power Report API M-Power Report API jar M-Power Report API CLASSPATH M-Power Report API 路 Windows Linux 說 CLASSPATH Windows 若 M-Power Report API 路 C:\reportapi\reportapijar CLASSPATH set CLASSPATH=;C:\reportapi\reportapijar Linux 若 M-Power Report API 路 /usr/local/jar/reportapijar /etc/profile ( ) 列 CLASSPATH=/:/usr/local/jar/reportapijar export CLASSPATH Linux CLASSPATH CLASSPATH Java M-Power Report API 了 讀 例 例 了 M-Power Report API 念 例 M-Power Report 錄 ReportDesigner\APIDemo 錄 例 錄裡 Java Application 例 例 來了 M-Power Rpeort API 力 Page 3 of 13

ReportSample 立 ReportSample 類 類 main 令列 行 ReportSample 類 import javautil*; import commpowerchart*; import commpowerreport*; import commpowerreportcore*; import commpowerreportspi*; import commpowerreportutils*; public class ReportSample { public static void main(string[] args) throws Exceptoin{ String chartfilepath = getjpegchart(); Systemoutprintln("The chart has been built at :" + chartfilepath); String reportfilepath = getpdfreport(new Integer(2020)); Systemoutprintln("The report has been built at :" + reportfilepath); } public static String getpdfreport(integer orderid) throws DataSourceException, ReportEmptyException { // } public static String getjpegchart() throws DataSourceException, MPChartException{ // } } 1-1 ReportSample 力 Page 4 of 13

ReportSample 了兩 method getpdfreport( ) 來 PDF getjpegchart( ) 來 JPEG main ( ) 行 getpdfreport( ) getjpegchart( ) 來 getjpegchart( ) getpdfreport( ) 兩 力 Page 5 of 13

來 來 PDF 來 JPEG M-Power Report Designer 了 類 說 了 M-Power Report API 料 ReportSample 例 Formprint [M-Power Report 錄 ] \APIDemo\ReportSample\print 錄 Demo1_PieDemopaint [M-Power Report 錄 ] \APIDemo\ReportSample\paint 錄 ReportSample 兩 路 來 ReportSample (PDF JPEG ) [M-Power Report 錄 ]\APIDemo\ReportSample\report 錄裡 了更 易了 APIDemo 錄 理 1-1 錄 說 \lib ReportSample 行 libraries ( jar ) \paint (paint ) \print (print ) \report 1-1 APIDemo 錄 說 力 Page 6 of 13

兩 Demo Database 料 連 Demo 料 JDBC 料 便 JDBC 料 連 1-2 Demo Database JDBC 連 料 料 JDBC (Driver) orghsqldbjdbcdriver 料 URL jdbc:hsqldb:hsql://localhost:5869 sa 1-2 Demo Database JDBC 連 料 力 Page 7 of 13

來 來 getpdfreport( ) 1-2 public static String getpdfreport(integer orderid) throws DataSourceException, ReportEmptyException { String reportfilepath = "D:\\MpowerReport Eval\\APIDemo\\ReportSample\\print\\Formprint"; String destdir = "D:\\MpowerReport Eval\\APIDemo\\ReportSample\\report\\"; ReportResource resource = new ReportResource("Form"); resourcesetdsdriver("orghsqldbjdbcdriver"); resourcesetdsurl("jdbc:hsqldb:hsql://localhost:5869"); resourcesetdsuserid("sa"); resourcesetdspass(""); Map parms = CollectionssynchronizedMap(new HashMap()); parmsput("reporttitle", "Sample Form Report"); parmsput("maxorderid", orderid); resourcesetreportparms(parms); String report = ReportManagergenPDFReportToFile(reportFilePath, resource, destdir); return report; } 1-2 getpdfreport( ) 力 Page 8 of 13

getpdfreport ( ) Form,print JDBC 料 M-Power Report API ReportManager genpdfreporttofile ( ) 來 PDF 連串 ReportManager 了 PDF 1-3 genpdfreporttofile( ) 了 genpdfreporttofile ( ) 參數 String report = ReportManagergenPDFReportToFile(reportFilePath, resource, destdir); 1-3 ReportManager genpdfreporttofile ( ) genpdfreporttofile ( ) 參數 1 路 ( reportfilepath 數 ) 2 ReportResource ( resource 數 ) 3 ( destdir 數 ) 參數 路 0 APIDemo 錄 Formprint 路 參數 genpdfreporttofile ( ) M-Power Report API 路 Form 來 PDF 參數 ReportResource 料來 ReportResource 說 參數 參數不 參數 PDF APIDemo 錄 report 錄 M-Power Report API 路 錄 ( \ //) M-Power Report API 錄 力 Page 9 of 13

M-Power Report API 30 不 易 了 1-4 getjpegchart( ) getpdfreport( ) getjpegchart( ) ReportSample 類 連 Demo Database 料 Demo1_PieDemopaint 來 JPEG public static String getjpegchart() throws DataSourceException, MPChartException { String reportfilepath = "D:\\MpowerReport Eval\\APIDemo\\ReportSample\\paint\\Demo1_PieDemopaint"; String destdir = " D:\\MpowerReport Eval\\APIDemo\\ReportSample\\report\\"; ReportResource resource = new ReportResource("Demo1_PieDemo"); resourcesetdsdriver("orghsqldbjdbcdriver"); resourcesetdsurl("jdbc:hsqldb:hsql://localhost:5869"); resourcesetdsuserid("sa"); resourcesetdspass(""); String chart = ChartManagergenJPEGChartToFile(reportFilePath, resource, destdir); return chart; } 1-4 getjpegchart ( ) 力 Page 10 of 13

了 getjpegchart( ) 裡 1-2 不 1-5 String chart = ChartManagergenJPEGChartToFile(reportFilePath, resource, destdir); 1-5 genjpegcharttofile ( ) 1-5 M-Power Report API 30 API ChartManager 來 ChartManager 數 genjpegcharttofile ( ) JPEG 參數 1 路 ( reportfilepath 數 ) 2 ReportResource ( resource 數 ) 3 ( destdir 數 ) 參數 路 APIDemo 錄 paint 錄裡 Demo1_PieDemopaint 路 路 參數 genjpegcharttofile ( ) M-Power Report API 路 Demo1_PieDemo 來 JPEG 參數 ReportResource ReportResource ReportResource 類 參數 參數不 ( JPEG PNG ) 參數 getjpegchart ( ) APIDemo 錄 report 錄 M-Power Report API 路 錄 ( \ //) M-Power Report API 錄 力 Page 11 of 13

行 例 了 ReportSample 類 來 來 行 例 行 JDK (javacexe) Java ( JBuilder Eclipse NetBeans ) ReportSamplejava ReportSampleclass IDE 行 ReportSample 令 行 列 令 (! 行 Demo Database 便 料 料 ) C:\> Java ReportSample 行 1-1 行 1-1 ReportSample 行 行 錄 Formpdf Demo1_PieDemo,jpg 兩 1-2 1-2 力 Page 12 of 13

Demo1_PieDemojpg 例 1-3 1-3 JPEG 來 FormPDF 不 PDF 了 Acrobat Reader PDF PDF 力 Page 13 of 13