fillReport()

ReportLib.fillReport 関数の構文図は、次のとおりです。

  ReportLib.fillReport(
    report Report in,
    source DataSource in)
report
データを記録するレポート。
source
レポートへの記録に使用するデータのソース。
reportData 型の変数がどのようにレポートと関連付けられるかを示す例を考えてみます。
    eglReport     Report;
    eglReportData ReportData;
    eglReport.reportData = eglReportData;
source は、ReportData 型の変数で使用するフィールドを指示します。 source の各値はフィールド名ではなく、列挙型 DataSource の中の値です。
databaseConnection
次の例のように、reportData 変数の connectionName フィールドで参照されている変数を使用します。
  eglReportData.connectionName = "mycon";

この場合、データにアクセスする SQL ステートメントは、EGL の外部で作成される、レポート設計ファイル内にあります。

reportData
次の例のように、reportData 変数の data フィールドで参照されている変数を使用します。
  // an array of records, with data
  myRecords customerRecord[]; 

  eglReportData.data = myRecords;
sqlStatement
次の例のように、reportData 変数の sqlStatement フィールドに示されている SQL ステートメントを使用します。
  mySQLString = "Select * From MyTable"; 
  eglReportData.sqlStatement = mySQLString;    
以下は、呼び出し例です。
  ReportLib.fillReport (eglReport, DataSource.sqlStatement);
ご利用条件 | フィードバック
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
(C) Copyright IBM Japan 2005.