ReportClientDocument クラスを使用したレポート ソースの作成

SDK を使用してレポートを表示またはエクスポートする前に、JRC SDK からレポート ソースを取得する必要があります。

ReportClientDocument を使用してレポート ソースを作成する
  1. プロジェクト エクスプローラ ビューで、CrystalReportsDemo\WebContent フォルダに移動します。
  2. WebContent]を右クリックし、[新規]>[JSP]をクリックします。
  3. [新規 JavaServer Page]ダイアログ ボックスが開きます。

  4. ファイル名]フィールドに、「ViewerSample.jsp」と入力します。
  5. [終了]をクリックします。
  6. ViewerSample.jsp をダブルクリックして、ドキュメントを開きます。
  7. 次のコード スニペットを入力します。
  8. <%@page import="com.crystaldecisions.reports.sdk.*" %>

    <%@page import="com.crystaldecisions.sdk.occa.report.reportsource.*" %>

    <%@page import="com.crystaldecisions.sdk.occa.report.lib.*" %>

    <%

    Object reportSource = session.getAttribute("reportSource");

    if (reportSource == null)

    {

        ReportClientDocument reportClientDoc = new ReportClientDocument();

        String report = "/Sample Reports/Customer Profile Report.rpt";

        reportClientDoc.open(report, 0);

        reportSource = reportClientDoc.getReportSource();

        session.setAttribute("reportSource", reportSource);

    }

    %>






Business Objects
http://japan.businessobjects.com/
サポート サービス
http://japan.businessobjects.com/services/