• 検索結果がありません。

メイン JRXML をアップロードする

ドキュメント内 JasperReports Server CP User Guide JP (ページ 36-39)

3.2 簡単なレポートユニットをサーバに追加する

3.2.1 メイン JRXML をアップロードする

アップロードする前に JRXML が正しいかどうかを検証したい場合には、iReport を使います。サーバはアップロードされた JRXML を検証しません。

レポート データ

データソース

Data Source

クエリ

Query

メインJRXML

Main JRXML

リソース

Resources

入力コントロール

Input Controls

レポート 出力

Report Output

参照(References) データフロー

※ 画像、フォント、

リソースの束、スクリプトレット

If you want to validate the JRXML before uploading it, use iReport. The server doesn’t validate the JRXML when you upload it.

ここでは、リポジトリ内のレポートに名前を設定する方法と、他のすべての要素を参照するメイン JRXML ファイルをアップロー ドする方法について説明します。

This procedure shows you how to set up a name for the report in the repository and upload the main JRXML file that references all other elements.

シンプルレポートサンプルのメイン JRXML をアップロードするには:

1. 管理者としてサーバにログインし、[表示] > [リポジトリ] を選択します。

Log into the server as administrator and select View > Repository.

管理者じゃないユーザでログインした場合でもレポートをサーバにアップロードすることはできますが、この サンプルの場合は、画像リソースにアクセスするために管理者権限を必要とします。

If you log in as a user, you can upload a report unit to the server, but this example requires an administrator login to access the image resources.

2. レポートを追加するフォルダを決定します。

このサンプル場合、root > Reports > Samples の中とします。

Locate the folder where you want to add the report.

In this example, go to root > Reports > Samples.

3. Samples フォルダを右クリックしてコンテクストメニューを表示し、[リソースの追加] > [JasperReport] を選択しま す。

Right-click the Samples folder and select Add Resource > JasperReport from the context menu.

現在ログインしているユーザにそのフォルダへの「書き込み」権限がない場合は、コンテクストメニューには [リソースの追加] しか表示されません。

Add Resource only appears on the context menu if your user account has write permission to the folder.

すると、「JasperReport の追加」ウィザードの「レポートのセットアップ」ページが表示されます。

The Set Up the Report page of the JasperReport wizard appears.

4. 追加するレポートの名前を「名前」欄に、そして説明を「説明」欄に記入します。「リソース ID」欄の内容は、「名前」欄 の内容から自動的に決定されます。

In Naming, enter the name and description of the new report, and accept the Resource ID generated as you type the name:

「名前」···レポートの表示名です。ここでは「New Simple Report」と⼊⼒します。

Name - Display name of the report: New Simple Report

「リソース ID」 ··リポジトリ内でのレポートオブジェクトの恒久的な名称です。ここでは「New_Simple_Report」

と⼊⼒します。

Resource ID - Permanent designation of the report object in the repository:

New_Simple_Report

「説明」···リポジトリパネルで表示される説明文です。必須⼊⼒ではありません。ここでは「これは簡単な例 です。」と⼊⼒します。

Description - Optional description displayed in the repository: This is a simple example 5. 「ローカル ファイルをアップロード」欄に、「<js-install>samples/reports/AllAccounts.jrxml」を設定します。

Select Upload a Local File and Browse to <js-install>samples/reports/AllAccounts.jrxml.

新しい JRXML をアップロードすることも、リポジトリから JRXML を選択することもできます。

You can upload a new JRXML or select a JRXML from the repository.

図 3-2は、「レポートのセットアップ」ページの記⼊例を⽰しています。

Figure 3-2 shows the completed Set Up the Report page.

図 3-2 「レポートのセットアップ」ページでの設定例 6. [コントロールとリソース] ボタンをクリックします。

サーバはメイン JRXML を読み込み、「コントロールとリソース」ページに必要なリソースのリストを表示します。ここに挙 げられているリソースは、サーバがレポートを検証し実⾏するために不⾜しているリソースです。

Click Controls & Resources.

The server uploads the main JRXML and displays the list of suggested resources on the Controls & Resources page.

The suggested resources are missing resources that the server needs to validate and run the report.

図 3-3 リソースリストで追加を指示されるリソース 7. 画像のハイパーリンク名を調べます。

Review the hyperlinked names of images:

LogoLink Logolink

AllAccounts_Res2 AllAccounts_Res2

次に、必要となるリソースをアップロードします。これを⾏わなければ、サーバがレポートを検証できません。

Next, upload the suggested file resources; otherwise, the server can’t validate the report.

ドキュメント内 JasperReports Server CP User Guide JP (ページ 36-39)