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

iReport からレポートを実⾏する

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

For more information, refer to section 6.6, “Running a Report from iReport,” on page 109.

iReport からリポジトリ内のリソースを追加、修正、削除するには:

1. 「Repository Navigator」が開いていなければ、[ウィンドウ] > [JasperReports Server Repository] をクリックし ます。

If the Repository Navigator isn’t open, click Window > JasperReports Server Repository.

2. リソースをリポジトリに追加するには、フォルダを右クリックし、コンテクストメニューから [Add] ならびに追加した いオブジェクトの種類を選択します。

To add a resource to the repository, right-click a folder, select Add, and then select the type of object you want to add.

JasperReport以外への追加を選択した場合、そのオブジェクトに関する場所やその他の情報を⼊⼒するための ダイアログが表示されます。JasperReportへの追加を選択した場合は、この手順はスキップされます。

If you choose to add any item other than a JasperReport, a dialog for entering the location and other information about the object appears. If you choose to add a JasperReport, a wizard guides you through the process.

3. リポジトリ内のリソースの位置を変えるには、リソースを⾒つけ出し、新しい位置へドラッグ&ドロップします。

または、以下の⼿順を⾏います。

To change the location of a resource in the repository, locate the object, then drag-and-drop it to the new location.

Or, perform the following steps:

a. リソースを右クリックし、コンテクストメニューから [コピー] または [カット] を選択します。または、キーボー ドショートカットの Ctrl-C または Ctrl-X をそれぞれに使います。

Right-click the object and select Copy or Cut. Or use the keyboard shortcuts: Ctrl-C and Ctrl-X, respectively.

b. 移動先のフォルダで右クリックし、コンテクストメニューから [ペースト] を選択するか、またはキーボードショー トカットの Ctrl-Vを使います。

Locate the destination, right-click, and select Paste, or use the keyboard shortcut Ctrl-V. リソースをカットしても、新しい位置にペーストされるまでは、そのリソースは元の場所から移動しません。

When cutting the object, it isn’t removed from its original location until pasted in the new location.

4. リポジトリからリソースを削除するには、リソースを⾒つけ出し、右クリックして、コンテクストメニューから [Delete]

を選択します。間違って削除しないように注意してください。

To delete a resource from the repository, locate the object, right-click it, and select Delete.

You must confirm your action to prevent accidental deletions.

5. リソースを修正するには、「Repository Navigator」でそのフォルダを⾒つけ、そのリソースを右クリックし、コンテクス トメニューから [Properties] を選択します。すると、「Properties」ダイアログが表示されます。ダイアログに表示され るタブの数は、リソースの種類によって異なります。⼊⼒コントロールの場合は、次の2つのタブがあります。

To modify a resource, find its folder in the Repository Navigator, then right-click the resource and select Properties.

In the Properties dialog appears. The number of tabs in the dialog depends on the type of resource. The dialog for an input control has two tabs:

General

Input Control Details

画像の場合は、次の 3 つのタブがあります。

The Properties dialog for an image has three tabs:

General Resource Description

6. [General] タブでは、リソースのリポジトリ ID、名前、説明を⾒ることができます。

On the General tab, view the object’s repository ID, name, and description.

管理者としてログインしていれば、これらのプロパティを修正し、リポジトリに保存することができます。

If you’re logged in as an administrator, you can modify property values and save them back to the Repository.

[General] 以外のタブは、もしあれば、それぞれのリソース種別に特有な制御情報を含んでいます。ファイルベースのリ ソースの場合、[Resource] タブが表示されます。画像の [Resource] タブには、画像のプロパティが表示されます。

Tabs other than General, if there are any, contain controls that are specific to each type of resource. File-based resources have a Resource tab. The image appears on the Resource tab of an image properties dialog.

7. [Resource] タブで、[Replace the resource with this file] にチェックを入れ、ハードディスクから別の画像を選択 して [Save] ボタンをクリックすると、サーバ上の画像が、選択したハードディスク上の画像に置き換えられます。

On the Resource tab, check Replace the resource with this file, browse to another image on your hard drive, and click Save to replace the image on the server with the image on your hard drive.

8. [Export File] ボタンをクリックし、[Save] ボタンをクリックすると、リソースをハードディスクにダウンロードするこ とができます。

例えば、「Repository Navigator」内で、あるサーバ上にあるリソースを別のサーバ上にあるリソースと置き換えることが できます。両方のサーバにプラグインを使って接続し、サーバ 1 から画像をエクスポートし、サーバ 2上で画像のプロパ ティを開き、サーバ 1 からエクスポートしたファイルを選択します。

Click Export File, and then Save to download a resource descriptor to your hard drive.

For example, in the Repository Navigator, you can replace a resource on one server with a resource on another.

Connect to both servers using the plug-in, export an image from server 1, open image properties on server 2, and browse to the file you exported from server 1.

9. [Input Control Details] タブでは、⼊⼒コントロールのデザインを変更することができます。図 6-8 は、Country入

⼒コントロールで変更可能なInput Control Details プロパティを示しています。

Change the design of an input control from the Input Control Details tab. Figure 6-8 shows the Input Control Details properties that you can change for the Country input control.

図 6-8 ⼊⼒コントロールリソースのプロパティ

10. 「Properties」ダイアログで [Save] ボタンをクリックすると、リポジトリに変更が反映されます。

Click Save in the Properties dialog to make the changes effective in the repository.

6.5 iReport からリポジトリ内のレポートを編集する

「Repository Navigator」では、 アイコンはレポートユニットを表し、 アイコンは JRXML ファイルを表しています。

iReport からリポジトリ内の JRXML ファイルを編集しているとき、iReportはそのファイルのコピーに対して操作を⾏ってい ます。編集が完了したとき、そのJRXML ファイルをリポジトリにアップロードして戻す必要があります。

In the Repository Navigator, the icon means a report unit, and means a JRXML file. When you work with a JRXML file in the Repository from iReport, iReport operates on a copy of the file. You need to upload the JRXML file to put it back into the repository when finished.

iReport からリポジトリ内の JRXML ファイルを編集するには:

1. 「Repository Navigator」で、レポートユニット内の JRXML ファイルを右クリックし、コンテクストメニューから [Open in editor] を選択します。

その JRXML ファイルは、リポジトリから、ローカルの <USER_HOME>/.ireport/jstmp ディレクトリにコピーされます。こ のディレクトリは、決して自動的にはクリアされません。

JRXML ファイルが、「Designer」ウィンドウに表示されます。

In the Repository Navigator, right-click the JRXML file in the report unit and select Open in Editor.

The JRXML from the repository is stored locally in the <USER_HOME>/.ireport/jstmp directory. This directory is never automatically cleared.

The JRXML appears in the Designer window.

2. Designer または XMLエディタで、必要なだけの編集を⾏います。画像やサブレポートを追加する場合は、「6.3 iReport からリポジトリ内にレポートユニットを作る」(p.134)を参照してください。

Edit the file as needed, either in the Designer or in the XML editor. For information about adding images or subreports to the JRXML file, see section 6.3, “Creating a Report Unit in the Repository from iReport,” on page 103.

3. ファイルを保存し、リポジトリにアップロードするには、「Repository Navigator」でそのファイルを右クリックし、コン テクストメニューから [Replace with current document] を選択します。

操作が成功した旨を告げるメッセージが表示されます。

To save the file and upload it to the repository, right-click the file in the Repository Navigator and click Replace with Current JRXML.

A message confirms the operation’s success.

iReport からリポジトリ内のレポートユニットを編集するには:

1. 「Repository Navigator」で、レポートユニットを右クリックし、コンテクストメニューから [Properties] を選択しま す。

In the Repository Navigator, right-click the report unit and select Properties.

2. [General] タブでは、リポジトリ名と説明を変更します。

On the General tab, change the repository name or description.

3. [Main Report and Data Source] タブでは、メイン JRXML ファイルを、リポジトリから選択または iReport を通じて アップロードした JRXMLファイルに変更することができます。[Current Report] ボタンをクリックすると、現在iReport で編集中の JRXML が使用されます。同様に、データソースを、リポジトリから選択または iReport を通じてアップロード したデータソースに変更することができます(図 6-9)。

On the Main Report and Data Source tab, you can change the JRXML file for the report, either by selecting one from the repository, or uploading one through iReport. Click Current Report to use the JRXML currently being edited in iReport. Similarly, you can select the data source from the repository or from iReport. See Figure 6-9.

4. [Other] タブでは、任意の⼊⼒コントロールの表⽰プロパティを設定します。

On the Other tab, set display properties for any input controls.

5. 「JSP」欄では、コントロールの体裁を修正します。

「Controls Layout」欄では、それがどこに表示されるかを決めます。

In the JSP fields, modify the appearance of the controls.

The Controls Layout determines where they appear.

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