レポートウィザードを使って、最新のBusiness b-ridge 連携データを使った帳票を作成。
Crystal Reports には、JDBC 標準向けのサポートが組み込まれています。この記事では、Business b-ridge の機能を持つ帳票を作成するレポート作成ウィザードの使い方を説明します。
Business b-ridge JDBC Driver のインストール
CData JDBC Driver for Business b-ridge を、ドライバーのJAR をCrystal Reports のクラスパスに含めてインストール:DataDriverCommonElement の下のClassPath element のパスに、 .jar を含むファイルのフルパスを追加します。
CRConfig.xml は通常C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java に配置されます。— パスはインストールによって若干異なる場合があります。ドライバーのJAR はインストールディレクトリの[lib]サブフォルダ内にあります。
ClassPath にJAR を追加したら、Crystal Reports を再起動します。
Business b-ridge データに接続
下記の手順に従って、レポート作成ウィザードを使ってBusiness b-ridge 接続を作成します。
- 新しい空の帳票で、[Create New Connection]>[JDBC (JNDI)]をクリックします。
ウィザードでJDBC 接続URL を選択します。
jdbc:businessbridge:
ドライバーのクラス名を設定:
cdata.jdbc.businessbridge.BusinessBridgeDriver
When connecting to Business b-ridge, CompanyKey, ProjectKey, and SubscriptionKey are required.
To obtain the SubscriptionKey, follow the steps below:
- Log in to Business b-ridge API Protal and go to "Profile" in the "Your name" menu.
- In your subscription section click "Main Key" to retrieve their respective values.
Authenticate to Business b-ridge Account
Set the following connection properties to connect:
- CompanyKey: Set the Business b-ridge Company Key of the connection destination.
- ProjectKey: Set the Business b-ridge Project Key of the connection destination.
- SubscriptionKey: Set the value "Subscription Key".
帳票をデザイン
JDBC 接続をBusiness b-ridge に追加したら、レポート作成ウィザードを使ってBusiness b-ridge を帳票に追加できます。
-
帳票に必要なテーブルやフィールドを選択して、データソースを設定します。この例では、CDATA テーブルのItemId およびStructureId カラムを使います。
-
チャートの種類を設定 ウィザードを完了すると、Crystal Reports はBusiness b-ridge data に実行されるSQL クエリをビルドします。ドライバーは、ライブBusiness b-ridge data に対してクエリを実行します。
- 必要に応じて、ほかのフィルタや帳票テンプレートを設定します。
-
データのインポートが終わったら、データをサマライズもしくはソートするチャートやレポートオブジェクトを作成できます。[Insert]>[Chart]をクリックして、チャートエキスパートを開きます。Total StructureId by ItemId を表すグラフを作成するには、ItemId を[On Change Of]メニューセレクションの下のボックスに追加してからStructureId を[Show Values]の下のボックスに追加します。
完成した帳票をプレビューして、チャートにデータが入っていることを確認します。Null 値を取り除きたい場合は、SelectionFormula を使います。
