レポートウィザードを使って、最新のAcumatica 連携データを使った帳票を作成。
Crystal Reports には、JDBC 標準向けのサポートが組み込まれています。この記事では、Acumatica の機能を持つ帳票を作成するレポート作成ウィザードの使い方を説明します。
Acumatica JDBC Driver のインストール
CData JDBC Driver for Acumatica を、ドライバーの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 を再起動します。
Acumatica データに接続
下記の手順に従って、レポート作成ウィザードを使ってAcumatica 接続を作成します。
- 新しい空の帳票で、[Create New Connection]>[JDBC (JNDI)]をクリックします。
ウィザードでJDBC 接続URL を選択します。
jdbc:acumatica:Url = https://try.acumatica.com/ISV/entity/Default/17.200.001/;User=user;Password=password;Company=CompanyName;
ドライバーのクラス名を設定:
cdata.jdbc.acumatica.AcumaticaDriver
Set the following connection properties to connect to Acumatica:
- User: Set this to your username.
- Password: Set this to your password.
- Company: Set this to your company.
- Url: Set this to your Acumatica URL, in the format http://{Acumatica ERP instance URL}/entity/{Endpoint name}/{Endpoint version}/.
For example: https://acumatica.com/entity/Default/17.200.001/
See the Getting Started guide in the CData driver documentation for more information.
帳票をデザイン
JDBC 接続をAcumatica に追加したら、レポート作成ウィザードを使ってAcumatica を帳票に追加できます。
-
帳票に必要なテーブルやフィールドを選択して、データソースを設定します。この例では、Events テーブルのId およびlocation_displayname カラムを使います。
-
チャートの種類を設定 ウィザードを完了すると、Crystal Reports はAcumatica data に実行されるSQL クエリをビルドします。ドライバーは、ライブAcumatica data に対してクエリを実行します。
- 必要に応じて、ほかのフィルタや帳票テンプレートを設定します。
-
データのインポートが終わったら、データをサマライズもしくはソートするチャートやレポートオブジェクトを作成できます。[Insert]>[Chart]をクリックして、チャートエキスパートを開きます。Total location_displayname by Id を表すグラフを作成するには、Id を[On Change Of]メニューセレクションの下のボックスに追加してからlocation_displayname を[Show Values]の下のボックスに追加します。
完成した帳票をプレビューして、チャートにデータが入っていることを確認します。Null 値を取り除きたい場合は、SelectionFormula を使います。
