Page History
Anchor | ||||
---|---|---|---|---|
|
...
Table of Contents | ||
---|---|---|
|
はじめに
Styleclass | ||
---|---|---|
| ||
このチュートリアルでは、結合サブクエリーの設定を段階的に説明します。結合は、同じまたは異なるビューやソースから、複数のフィールドを1つのカラム(列)に組み合わせる必要がある場合に使用するものと考えるとよいでしょう。
このシナリオのメインレポートでは、地域別の請求額の一覧を設定します。次に、結合クエリーを使用して同じカラム(列)内にある負のコスト数値を表示した後、小計を追加して地域ごとの合計収入を確認します。
マスタークエリー
マスタークエリーには以下の項目を含めます:
- Camp Region
- 計算フィールド: "Invoiced" テキストラベル
- Sum Invoiced Amount
結合クエリー
結合クエリーには以下の項目を含めます:
- Camp Region
- 計算フィールド:"Cost" テキストラベル
- 計算フィールド:Sum Cost × -1 (コスト数値を負の値に変換します)
初期化
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
マスタークエリー
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
ラベルフィールド
マスタークエリーを完了するには、ラベルフィールドが必要となります。このフィールドは、マスタークエリーのロウ(行)を"Invoiced"ロウ(行)として識別するために使用されます。結合クエリーで同様の計算が行われ、"Cost"としてロウ(行)が識別されます。
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Creating a Field Label
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
結合クエリー
Styleclass | ||
---|---|---|
| ||
結合の作成
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
計算
結合クエリーを完了するには、2つの計算が必要となります:
- Label:結合クエリーのロウ(行)を"Cost"ロウ(行)として識別するために使用されます。マスタークエリーで同様の計算が行われ、"Invoiced"としてロウ(行)が識別されます。
- Cost:コスト数値を負の値に変換するために使用されます。つまり、小計がレポートに追加されると、コスト金額が請求金額から差し引かれます。
Label
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Cost
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
結合の設定
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
設定の編集
Section | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
...
書式
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
保存
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
horizontalrule |
---|
Styleclass | ||
---|---|---|
| ||