//Variable declaration myReport Report; myReportData ReportData; //Function containing report invocation code function makeReport() //Initialize Report file locations myReport.reportDesignFile = "reportDesignFileName.jasper"; myReport.reportDestinationFile = "reportDestinationFileName.jrprint"; //Set the report data via a connection using the SQL statement //embedded in the report design sysLib.defineDatabaseAlias("alias", "databaseName"); sysLib.connect("alias", "userid", "password"); myReportData.connectionName="connectionName"; myReport.reportData = myReportData; //Fill the report with data reportLib.fillReport(myReport, DataSource.databaseConnection); //Export the report in PDF format myReport.reportExportFile = "reportDesignFileName.pdf"; reportLib.exportReport(myReport, ExportFormat.pdf); end
//Variable declaration myReport Report; myReportData ReportData; //Function containing the report driving code function makeReport() //Initialize myReport file locations myReport.reportDesignFile = "reportDesignFileName.jasper"; myReport.reportDestinationFile = "reportDestinationFileName.jrprint"; //Set the report data populateReportData(); myReport.reportData = myReportData; //Fill the report with data reportLib.fillReport(myReport, DataSource.reportData); //Export the report in HTML format myReport.reportExportFile = "reportDesignFileName.html"; reportLib.exportReport(myReport, ExportFormat.html); end function populateReportData() //Insert EGL code here which populates myReportData ... end
//Variable declaration myReport Report; myReportData ReportData; //Function containing report driving code function makeReport() //Initialize Report file locations myReport.reportDesignFile = "reportDesignFileName.jasper"; myReport.reportDestinationFile = "reportDestinationFileName.jrprint"; //Set the report data via a SQL statement myReportData.sqlStatement = "SELECT * FROM dataBaseTable"; myReport.reportData = myReportData; //Fill the report with data reportLib.fillReport(myReport, DataSource.sqlStatement); //Export the report in text format myReport.reportExportFile = "reportOutputFileName.txt"; reportLib.exportReport(myReport, ExportFormat.text); end
関連する概念
EGL レポート作成プロセスの概要
EGL レポートの概要
関連するタスク
レポートを駆動するコードの作成
関連する参照項目
ライブラリー内のデータ・レコード
データ・ソース
EGL レポート・ハンドラー
EGL ライブラリー ReportLib