Page History
...
Table of Contents | ||
---|---|---|
|
...
はじめに
Styleclass | ||
---|---|---|
| ||
In this tutorial, we will walk through setting up an append sub query in order to compare two years worth of figures.
A good way to think about Appends is - use them if you need to add a column to a report that requires filters different to the rest of the report.
In this scenario our main report will look at invoice figures by country in 2014. The column we want to add is the invoiced figures in 2013. The filters Year = 2014 and Year = 2013 conflict, so the additional column will have to be added through the append.
Master Query
このチュートリアルでは、2年分の数値を比較するために追加サブクエリーを設定する処理を、段階的に説明します。
追加サブクエリーは、レポートのその他の部分とは異なるフィルターを必要とするカラム(列)をレポートに追加する場合に使用するものと考えるとよいでしょう。
このシナリオのメインレポートでは、2014年における国別の請求額を表示します。追加するカラム(列)は、2013年における請求額です。フィルターYear = 2014とYear = 2013が競合するため、追加を使用して別のカラム(列)を加える必要があります。
マスタークエリー
マスタークエリーには以下の項目を含めます:The Master Query is going to include:
- Athlete Country
- Sum Invoiced Amount
- Filter: フィルター: Year = 2014
This will mean that we have Country as a common field for 2014 and 2013 so this will form our join when we add the Append.
Note: sometimes you will have a case where you don't wish to filter the Country list by 2014, this may be because some countries have no results for 2014 yet. In this case you would have Country in the Master Query, and an Append Query for each Invoiced Amount.
Append Query
The Append Query will include:
この場合、「Country」は2014年と2013年の共通フィールドであるため、追加を加えると結合が行われます。
注意:一部の国にはまだ2014年に対する結果が存在しないという理由などから、「Country」一覧を2014年でフィルタリングしたくない場合もあります。この場合は、マスタークエリーに「Country」を含め、それぞれの「Invoiced Amount」のために追加クエリーを使用します。
追加クエリー
追加クエリーには以下の項目を含めます:
- 結合:Athlete Join: Athlete Country
- Sum Invoiced Amount
- Filter: Year フィルター:Year = 2013
This will be joined to the Master Query using the Athlete Country field. The query will be filtered by Year = 2013, and will include a copy of the Sum Invoiced Amount field to be filtered.
...
この追加クエリーは、「Athlete Country」フィールドを使用してマスタークエリーに結合されます。クエリーはYear = 2013でフィルタリングされ、フィルター対象となる「Sum Invoiced Amount」フィールドのコピーがクエリーに組み込まれます。
初期化
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
マスタークエリー
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
追加クエリー
Styleclass | ||
---|---|---|
| ||
...
追加サブクエリーの作成
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
追加サブクエリーの結合
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
フィルター
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
名前&保存
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
カラムの追加
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
設定の編集
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
フィルターの適用
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
マスターフィルター
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
サブクエリーフィルター
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
書式
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
保存
Styleclass | ||
---|---|---|
| ||
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
horizontalrule |
---|
Styleclass | ||
---|---|---|
| ||