レポートウィザードを使って、最新のQuickBase 連携データを使った帳票を作成。
Crystal Reports には、JDBC 標準向けのサポートが組み込まれています。この記事では、QuickBase の機能を持つ帳票を作成するレポート作成ウィザードの使い方を説明します。
QuickBase JDBC Driver のインストール
CData JDBC Driver for QuickBase を、ドライバーの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 を再起動します。
QuickBase データに接続
下記の手順に従って、レポート作成ウィザードを使ってQuickBase 接続を作成します。
- 新しい空の帳票で、[Create New Connection]>[JDBC (JNDI)]をクリックします。
ウィザードでJDBC 接続URL を選択します。
jdbc:quickbase:User=user@domain.com;Password=password;Domain=myinstance.quickbase.com;ApplicationToken=bwkxrb5da2wn57bzfh9xn24
ドライバーのクラス名を設定:
cdata.jdbc.quickbase.QuickBaseDriver
User Authentication Method
To authenticate with user credentials, specify the following connection properties:
- Set the User and Password.
- If your application requires an ApplicationToken;, you must provide it otherwise an error will be thrown. You can find the ApplicationToken under SpecificApp > Settings > App management > App properties > Advanced settings > Security options > Manage Application Token.
User Token Authentication
To authenticate with a user token, specify the following connection properties:
- Set UserToken and you are ready to connect. You can find the UserToken under Quick Base > My Preferences > My User Information > Manage User Tokens.
帳票をデザイン
JDBC 接続をQuickBase に追加したら、レポート作成ウィザードを使ってQuickBase を帳票に追加できます。
-
帳票に必要なテーブルやフィールドを選択して、データソースを設定します。この例では、SampleTable_1 テーブルのId およびColumn1 カラムを使います。
-
チャートの種類を設定 ウィザードを完了すると、Crystal Reports はQuickBase data に実行されるSQL クエリをビルドします。ドライバーは、ライブQuickBase data に対してクエリを実行します。
- 必要に応じて、ほかのフィルタや帳票テンプレートを設定します。
-
データのインポートが終わったら、データをサマライズもしくはソートするチャートやレポートオブジェクトを作成できます。[Insert]>[Chart]をクリックして、チャートエキスパートを開きます。Total Column1 by Id を表すグラフを作成するには、Id を[On Change Of]メニューセレクションの下のボックスに追加してからColumn1 を[Show Values]の下のボックスに追加します。
完成した帳票をプレビューして、チャートにデータが入っていることを確認します。Null 値を取り除きたい場合は、SelectionFormula を使います。
