biz-Streamマニュアル XMLページレイアウトタグ リファレンス 第9章 繰り返し制御 9.2 縦方向フレーム<flow-area>

9.2 縦方向フレーム<flow-area>

9.2.1機能説明

フレームは子要素のレコード、サブフレームを指定された領域内で繰り返し表示します。
1ページの領域を越えるデータ量の場合、改ページを行います。
縦方向フレームでは、データの増減により縦方向に領域が可変となります。


9.2.2属性説明

1flow-area属性説明

フレームは、レコード、サブフレームを子要素として定義することができます。

属性名指定説明指定内容初期値
name 任意 名前 CDATA
x 任意 X座標 CDATA 0
y 任意 Y座標 CDATA 0
unit 任意 単位 (Choice) mm / cm / in / px / pt mm
width 任意 CDATA
height 任意 高さ CDATA
master-reference 任意 <bs:datasource-master>との関連付け CDATA ※1
no-data-disabled 任意 データが0件の場合、フレームを表示しない CDATA true(表示しない) /
false(表示する)
false
max-rows 任意 指定した行数で改ページ
clone 任意 CDATA 定義を参照する定義済みの<flow-area>タグを指定
header-footer-order 任意 ヘッダ、フッタの表示位置と表示順序 CDATA asis/layout-only-bottom/page-and-layout-bottom
  • (注)初期値:出荷時のXMLデフォルト情報(default_values.properties)値を表します。ユーザにより値の変更が行われた場合は内容が異なります。
  • ※1ドキュメントレイアウトの<bs:block-container>にもmaster-referenceを設定している場合は、それぞれがユニークとなるように設定してください。
  • 異なる名前(Name属性)の複数のフレーム(<flow-area>)に同一データソースを設定すると白紙ページが出力されます。

header-footer-order属性

header-footer-order属性では、表(flow-table / hflow-table、flow-record / hflow-record)のヘッダ、フッタの表示位置と表示順序を制御します。指定方法は以下のとおりです。

指定方法フッタの表示位置ヘッダ、フッタの表示順
asis ページフッタ、レイアウトフッタを明細行の最終データの直後に表示します。 ヘッダ、フッタともに、レイアウト上の指定順どおりに出力します。
layout-only-bottom レイアウトフッタをflow-area内の最下端に表示します。
ページフッタは明細行の最終データの直後に表示します。
レイアウト上の指定順に関わらず、レイアウトヘッダ、レイアウトフッタをページヘッダ、ページフッタより外側に出力します。
page-and-layout-bottom ページフッタ、レイアウトフッタをflow-area内の最下端に表示します。 レイアウト上の指定順に関わらず、レイアウトヘッダ、レイアウトフッタをページヘッダ、ページフッタより外側に出力します。
header-footer-order属性を使用したサンプルは下記の『flow-areaサンプル4』をご参照ください。


2flow-frame属性説明

サブフレームについての定義を行います。
複数のデータソースから帳票を作成する場合に、サブフレームごとにデータソースと関連付けができます。
サブフレームは、レコードを子要素として定義することができます。

属性名指定説明指定内容初期値
name 任意 名前 CDATA
unit 任意 単位 (Choice) mm / cm / in / px / pt mm
width 任意 CDATA
height 任意 高さ CDATA
master-reference 任意 <bs:datasource-master>との関連付け CDATA
no-data-disabled 任意 データが0件の場合、サブフレームを表示しない (Choice) true(表示しない) /
false(表示する)
false


3flow-record属性説明

レコードについての定義を行います。
データソースのデータを表示するための要素です。
レコードは、テキスト・イメージなどを子要素として定義することができます。

属性名指定説明指定内容初期値
name 任意 名前 CDATA
unit 任意 単位 (Choice) mm / cm / in / px / pt mm
width 任意 CDATA
height 任意 高さ CDATA
record-type 任意 行の種別 (Choice) header:ヘッダ行 /
footer:フッタ行 /
details:明細行 /
subtotal:小計行 /
total:合計行
details
view 任意 表示するタイミング、行の種別がheader, footer の時に有効 (Choice) layout:一度だけ表示する /
page:ページ毎に表示する
layout
print-force 任意 ページヘッダ・ページフッタの強制表示フラグ ※1 CDATA true/false
page-footer-once 任意 フレーム内でページフッタを1度だけ表示する CDATA true/false
  • ※1 print-force属性については、次の「4 flow-table属性説明」を参照してください。


4flow-table属性説明

表形式の行に関する定義を行います。
行の高さの定義を行わない場合、flow-table-cellの最大の高さが高さとして採用されます。
幅はflow-table-cellの幅の合計が幅として採用されます。

属性名指定説明指定内容初期値
name 任意 名前 CDATA
record-type 任意 行の種別 (Choice) header:ヘッダ行 /
footer:フッタ行 /
details:明細行 /
subtotal:小計行 /
total:合計行
details
view 任意 表示するタイミング、行の種別がheader, footer の時に有効 (Choice) layout:一度だけ表示する /
page:ページ毎に表示する
layout
line-height 任意 行の高さ CDATA
border-width 任意 枠線の幅 CDATA 0.1
border-color 任意 枠線の色 CDATA
border-style 任意 枠線のスタイル (Choice) 「6.2 線<Line>」にある属性説明の「LineStyle属性」を参照 Solid
background-color 任意 背景の色 CDATA
unit 任意 単位 (Choice) mm / cm / in / px / pt mm
print-force 任意 ページヘッダ・ページフッタの強制表示フラグ CDATA true/false
page-footer-once 任意 フレーム内でページフッタを1度だけ表示する CDATA true/false

print-force属性

print-force属性では、表(flow-table / hflow-table、flow-record / hflow-record)のページヘッダ、ページフッタの表示を制御します。指定方法は以下のとおりです。

指定方法挙動についての説明
true 明細データが0件の場合、または最終ページにレイアウトフッタのみが表示される場合に、ページヘッダ、ページフッタを表示します。
false 明細データが0件の場合、または最終ページにレイアウトフッタのみが表示される場合に、ページヘッダ、ページフッタを表示しません。

print-force属性を指定しない場合、レイアウトのバージョンによって挙動が異なります。

レイアウトのバージョン挙動についての説明
versionが5.0以降の場合 明細データが0件の場合に、ページヘッダ、ページフッタを表示しません。
versionが5.0未満の場合 flow-area直下と、flow-frame内で未指定時の動作が異なります。

flow-area直下においては、明細データが0件の場合に表示します。(trueと同等)
※ただし、レイアウトフッタのみがはみ出す場合においては表示しません。(最終ページのみの特殊処理)
flow-frame内においては、明細データが0件の場合に表示しません。(falseと同等)
print-force属性を使用したサンプルは下記の『flow-areaサンプル5』をご参照ください。



5flow-table-cell属性説明

各行におけるセルの定義を行います。

属性名指定説明指定内容初期値
name 任意 名前 CDATA
cell-width 必須 セルの幅 CDATA
border-width 任意 枠線の幅 CDATA 0.1
border-color 任意 枠線の色 CDATA
border-style 任意 枠線のスタイル (Choice) 「6.2 線<Line>」にある属性説明の「LineStyle属性」を参照 Solid
background-color 任意 背景の色 CDATA
align 任意 複数要素の整列方向 (Choice) horizon / vertical / none horizon
text-align 任意 配置(水平方向) (Choice) left / center / right left
cell-align 任意 配置(垂直方向) (Choice) top / center / bottom bottom
unit 任意 単位 (Choice) mm / cm / in / px / pt mm

※ Narrow属性は存在しませんが、レイアウト・デザイナのプロパティウィンドウに表示されます



9.2.3記述例

flow-areaサンプル1

会社情報と売上明細の2つのCSVをそれぞれデータソースとして定義し、会社情報はページ全体に適用し売上明細はフレームにより繰り返し処理をするサンプルです。

flow-areaサンプル1-doc(『<biz-Stream_home>/sample/flow-area/flow-areaSample1-doc.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:datasource-master-set>
        <bs:datasource-master master-name="header-csv" position="inherit">
            <bs:csv-master-reference master-reference="header-field"/>

        </bs:datasource-master>
        <bs:datasource-master master-name="table1-csv" position="inherit">
            <bs:csv-master-reference master-reference="table1-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="header-field" used-header="false">
            <bs:csv-statement master-reference="header-resource"/>

            <bs:data-type column-name="Customer Name" column-no="1" type="char"/>
            <bs:data-type column-name="Customer Address1" column-no="2" type="char"/>
            <bs:data-type column-name="Customer Address2" column-no="3" type="char"/>
            <bs:data-type column-name="Customer Address3" column-no="4" type="char"/>
            <bs:data-type column-name="ISSUE DATE" column-no="5" type="char"/>
        </bs:csv-master>
        <bs:csv-master master-name="table1-field" used-header="false">
            <bs:csv-statement master-reference="table1-resource"/>

            <bs:data-type column-name="商品コード" column-no="1" type="char"/>
            <bs:data-type column-name="商品名" column-no="2" type="char"/>
            <bs:data-type column-name="単価" column-no="3" type="decimal"/>
            <bs:data-type column-name="数量" column-no="4" type="decimal"/>
            <bs:data-type column-name="金額" column-no="5" type="decimal"/>
        </bs:csv-master>
        <bs:csv-resource-master master-name="header-resource" url="${base-dir}/sample/xml/flow-area/header.csv" included-header="true"/>

        <bs:csv-resource-master master-name="table1-resource" url="${base-dir}/sample/xml/flow-area/sales.csv" included-header="true"/>

    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4V" page-height="297mm" page-width="210mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4V" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container master-reference="header-csv">
                <bs:include href="${base-dir}/sample/xml/flow-area/flow-areaSample1-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>


flow-areaサンプル1-page(『<biz-Stream_home>/sample/flow-area/flow-areaSample1-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="5" y="290" width="200" height="280" master-reference="table1-csv" no-data-disabled="false">
        <!--会社情報を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable1" line-height="50" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="45" X="0" Y="3" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="100" Height="10" X="5" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="85" Height="10" X="110" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="190" Height="25" X="5" Y="7" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <GroupAlignment Width="200" Height="50" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="none" Narrow="none">
                    <Label Width="15" X="8" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">顧客名</Label>
                    <Label Name="Customer Name" Width="70" X="28" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="112" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">発効日</Label>
                    <Label Name="ISSUE DATE" Width="55" X="132" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="8" Y="25" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">住所</Label>
                    <Label Name="Customer Address1" Width="70" X="28" Y="24.648" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address2" Width="70" X="28" Y="17" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address3" Width="70" X="28" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <!--分類を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">売上明細</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目名を表示するページヘッダー ページ毎に表示されます。-->

        <flow-table name="flowtable3" line-height="12" record-type="header" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目を表示する明細行 データソースの件数分表示されます。-->

        <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>


売上明細(table1-csv)をフレーム(flow-area)と関連付けすると、繰り返し処理されます。


  • レコード(flow-record)のrecord-type属性"header"とview属性"layout"の組み合わせは帳票全体で1度だけ表示されます。
  • レコード(flow-record)のrecord-type属性"header"とview属性"page"の組み合わせはページ毎に表示されます。
  • レコード(flow-record)のrecord-type属性"details"の場合、フレームに関連付けされているデータソースの件数分だけ表示されます。

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample1.pdf』)

flow-areaサンプル1


flow-areaサンプル2

会社情報と売上明細、購入明細の3つのCSVをそれぞれデータソースとして定義し各サブフレームには
それぞれのデータソース(会社情報、売上明細、購入明細)を関連付けし繰り返し処理するサンプルです。

flow-areaサンプル2-doc(『<biz-Stream_home>/sample/flow-area/flow-areaSample2-doc.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:datasource-master-set>
        <bs:datasource-master master-name="header-csv" position="inherit">
            <bs:csv-master-reference master-reference="header-field"/>

        </bs:datasource-master>
        <bs:datasource-master master-name="table1-csv" position="inherit">
            <bs:csv-master-reference master-reference="table1-field"/>

        </bs:datasource-master>
        <bs:datasource-master master-name="table2-csv" position="inherit">
            <bs:csv-master-reference master-reference="table2-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="header-field" used-header="false">
            <bs:csv-statement master-reference="header-resource"/>

            <bs:data-type column-name="Customer Name" column-no="1" type="char"/>
            <bs:data-type column-name="Customer Address1" column-no="2" type="char"/>
            <bs:data-type column-name="Customer Address2" column-no="3" type="char"/>
            <bs:data-type column-name="Customer Address3" column-no="4" type="char"/>
            <bs:data-type column-name="ISSUE DATE" column-no="5" type="char"/>
        </bs:csv-master>
        <bs:csv-master master-name="table1-field" used-header="false">
            <bs:csv-statement master-reference="table1-resource"/>

            <bs:data-type column-name="商品コード" column-no="1" type="char"/>
            <bs:data-type column-name="商品名" column-no="2" type="char"/>
            <bs:data-type column-name="単価" column-no="3" type="decimal"/>
            <bs:data-type column-name="数量" column-no="4" type="decimal"/>
            <bs:data-type column-name="金額" column-no="5" type="decimal"/>
        </bs:csv-master>
        <bs:csv-master master-name="table2-field" used-header="false">
            <bs:csv-statement master-reference="table2-resource"/>

            <bs:data-type column-name="商品コード" column-no="1" type="char"/>
            <bs:data-type column-name="商品名" column-no="2" type="char"/>
            <bs:data-type column-name="単価" column-no="3" type="char"/>
            <bs:data-type column-name="数量" column-no="4" type="char"/>
            <bs:data-type column-name="金額" column-no="5" type="char"/>
        </bs:csv-master>
        <bs:csv-resource-master master-name="header-resource" url="${base-dir}/sample/xml/flow-area/header.csv" included-header="true"/>

        <bs:csv-resource-master master-name="table1-resource" url="${base-dir}/sample/xml/flow-area/sales.csv" included-header="true"/>

        <bs:csv-resource-master master-name="table2-resource" url="${base-dir}/sample/xml/flow-area/purchase.csv" included-header="true"/>

    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4V" page-height="297mm" page-width="210mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4V" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container>
                <bs:include href="${base-dir}/sample/xml/flow-area/flow-areaSample2-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

flow-areaサンプル2-page(『<biz-Stream_home>/sample/flow-area/flow-areaSample2-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="5" y="290" width="200" height="280" no-data-disabled="false">
        <!--会社情報を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-frame name="frame1" width="200" height="50" master-reference="header-csv" no-data-disabled="false">
            <flow-table name="flowtable1" line-height="50" record-type="header" view="layout">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="45" X="0" Y="3" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Square Width="100" Height="10" X="5" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Square Width="85" Height="10" X="110" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Square Width="190" Height="25" X="5" Y="7" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <GroupAlignment Width="200" Height="50" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="none" Narrow="none">
                        <Label Width="15" X="8" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">顧客名</Label>
                        <Label Name="Customer Name" Width="70" X="28" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                        <Label Width="15" X="112" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">発効日</Label>
                        <Label Name="ISSUE DATE" Width="55" X="132" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                        <Label Width="15" X="8" Y="25" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">住所</Label>
                        <Label Name="Customer Address1" Width="70" X="28" Y="24.648" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                        <Label Name="Customer Address2" Width="70" X="28" Y="17" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                        <Label Name="Customer Address3" Width="70" X="28" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none"/>
                    </GroupAlignment>
                </flow-table-cell>
            </flow-table>
        </flow-frame>
        <flow-frame name="frame2" width="200" height="38" master-reference="table1-csv" no-data-disabled="false">
            <!--売上明細の分類を表示する分類ヘッダー 全体で一度だけ表示されます。-->

            <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Width="25" X="3" Y="3" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">売上明細</Label>
                </flow-table-cell>
            </flow-table>
            <!--売上明細の項目名を表示する明細ヘッダー ページ毎に表示されます。-->

            <flow-table name="flowtable3" line-height="12" record-type="header" view="page">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                    <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                    <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                    <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                    <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
                </flow-table-cell>
            </flow-table>
            <!--売上明細を表示する明細行 データソースの件数分表示されます。-->

            <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                    <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                    <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                    <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                </flow-table-cell>
            </flow-table>
        </flow-frame>
        <flow-frame name="frame3" width="197.183" height="40.493" master-reference="table2-csv" no-data-disabled="false">
            <!--購入明細の分類を表示する分類ヘッダー 全体で一度だけ表示されます。-->

            <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">購入明細</Label>
                </flow-table-cell>
            </flow-table>
            <!--購入明細の項目名を表示する明細ヘッダー ページ毎に表示されます。-->

            <flow-table name="flowtable3" line-height="12" record-type="header" view="page">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                    <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                    <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                    <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                    <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
                </flow-table-cell>
            </flow-table>
            <!--購入明細を表示する明細行 データソースの件数分表示されます。-->

            <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
                <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                    <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                    <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                    <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                    <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                    <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                </flow-table-cell>
            </flow-table>
        </flow-frame>
    </flow-area>
</Layout>



データソースとサブフレームを関連付けすると、繰り返し処理されます。

  • サブフレーム(flow-frame)のmaster-reference属性でデータソース(header-csv)の会社情報と関連付けを行います。
  • サブフレーム(flow-frame)のmaster-reference属性でデータソース(table1-csv)の売上明細と関連付けを行います。データソースの件数分だけ明細を表示します。
  • サブフレーム(flow-frame)のmaster-reference属性でデータソース(table2-csv)の購入明細と関連付けを行います。データソースの件数分だけ明細を表示します。

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample2.pdf』)

flow-areaサンプル2

flow-areaサンプル3

表示する項目の長さが可変のデータを折り返しながら表示するサンプルです。
行毎にデータ長が異なるため行の高さが可変になります。

flow-areaサンプル3-doc(『<biz-Stream_home>/sample/flow-area/flow-areaSample3-doc.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:datasource-master-set>
        <bs:datasource-master master-name="table1-csv" position="inherit">
            <bs:csv-master-reference master-reference="table1-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="table1-field" used-header="false">
            <bs:csv-statement master-reference="table1-resource"/>

            <bs:data-type column-name="特長" column-no="1" type="char"/>
            <bs:data-type column-name="説明" column-no="2" type="char"/>
        </bs:csv-master>
        <bs:csv-resource-master master-name="table1-resource" url="${base-dir}/sample/xml/flow-area/bizstream1.csv" included-header="true"/>

    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4V" page-height="297mm" page-width="210mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4V" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container>
                <bs:include href="${base-dir}/sample/xml/flow-area/flow-areaSample3-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

flow-areaサンプル3-page(『<biz-Stream_home>/sample/flow-area/flow-areaSample3-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="15" y="290" width="180" height="280" master-reference="table1-csv" no-data-disabled="false" max-rows="10">
        <flow-table name="headerTable" line-height="20" record-type="header" view="layout">
            <flow-table-cell cell-width="180" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="" Height="20" X="0" Y="0" LineColor="0,0,0" LineStyle="Solid"/>

                <Label Width="50" X="5" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="horizon">biz-Streamとは</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="pageHeaderTable" line-height="20" record-type="header" view="page">
            <flow-table-cell cell-width="180" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="" Height="20" X="0" Y="0" LineColor="0,0,0" LineStyle="Solid"/>

                <Label Width="20" X="100" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="none">説明</Label>
                <Label Width="20" X="5" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="none">項目</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table record-type="details" view="layout">
            <flow-table-cell cell-width="90" border-color="0,0,0" align="horizon" text-align="left" cell-align="top" narrow="size">
                <multi-text name="特長" cell-width="90" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-size="16" font-style="PLAIN" margin="start:3;end:3;top:2;bottom:2" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false"/>
            </flow-table-cell>
            <flow-table-cell cell-width="90" border-color="0,0,0" align="horizon" text-align="left" cell-align="top" narrow="size">
                <multi-text name="説明" cell-width="90" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-size="16" font-style="PLAIN" margin="start:3;end:3;top:2;bottom:2" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false"/>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>

行の高さが動的に変るPDFは表レコード(flow-table)と横書き複数行テキスト(multi-text)との組み合わせで実現できます。

  • 表レコード(flow-table)のline-height属性を無指定にすることで、一番高いセルの高さが行の高さになります。
  • 横書き複数行テキスト(multi-text)のcell-height属性を無指定にすることでデータソースから(table1-csv)の説明のデータを折り返した高さがセルの高さになります。

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample3.pdf』)


flow-areaサンプル3


flow-areaサンプル4

表のレイアウトフッタの表示位置を指定するサンプルです。
このサンプルでは、ページフッタを明細行の直後に表示し、レイアウトフッタをflow-areaの一番下端に表示します。

flow-areaサンプル4-page.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample4-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="5" y="290" width="200" height="280" master-reference="table1-csv" no-data-disabled="false" header-footer-order="layout-only-bottom">
        <!--会社情報を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable1" line-height="50" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="45" X="0" Y="3" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="100" Height="10" X="5" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="85" Height="10" X="110" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="190" Height="25" X="5" Y="7" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <GroupAlignment Width="200" Height="50" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="none" Narrow="none">
                    <Label Width="15" X="8" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">顧客名</Label>
                    <Label Name="Customer Name" Width="70" X="28" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="112" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">発効日</Label>
                    <Label Name="ISSUE DATE" Width="55" X="132" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="8" Y="25" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">住所</Label>
                    <Label Name="Customer Address1" Width="70" X="28" Y="24.648" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address2" Width="70" X="28" Y="17" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address3" Width="70" X="28" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <!--分類を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">売上明細</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目名を表示するページヘッダー ページ毎に表示されます。-->

        <flow-table name="flowtable3" line-height="12" record-type="header" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目を表示する明細行 データソースの件数分表示されます。-->

        <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
        <flow-table name="Page Footer" line-height="18" record-type="footer" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" FillColor="204,255,204" LineStyle="Solid"/>

                <Label Width="50" X="75" Y="1" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="none">Page Footer</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="Layout Footer" line-height="18" record-type="footer" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" FillColor="255,255,204" LineStyle="Solid"/>

                <Label Width="50" X="75" Y="1" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="none">Layout Footer</Label>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>

(5行目抜粋)

<flow-area name="frame0" x="5" y="290" width="200" height="280" master-reference="table1-csv" no-data-disabled="false" header-footer-order="layout-only-bottom">

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample4.pdf』)

flow-areaサンプル6

flow-areaサンプル5

【print-force属性をtrueに指定した場合】

明細データが0件の場合に、ページヘッダを強制的に表示するサンプルです。

flow-areaSample5-page_true.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample5-page_true.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="5" y="290" width="200" height="280" master-reference="table1-csv" no-data-disabled="false" header-footer-order="layout-only-bottom">
        <!--会社情報を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable1" line-height="50" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="45" X="0" Y="3" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="100" Height="10" X="5" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="85" Height="10" X="110" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="190" Height="25" X="5" Y="7" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <GroupAlignment Width="200" Height="50" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="none" Narrow="none">
                    <Label Width="15" X="8" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">顧客名</Label>
                    <Label Name="Customer Name" Width="70" X="28" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="112" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">発効日</Label>
                    <Label Name="ISSUE DATE" Width="55" X="132" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="8" Y="25" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">住所</Label>
                    <Label Name="Customer Address1" Width="70" X="28" Y="24.648" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address2" Width="70" X="28" Y="17" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address3" Width="70" X="28" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <!--分類を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">売上明細</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目名を表示するページヘッダー ページ毎に表示されます。-->

        <flow-table name="flowtable3" line-height="12" record-type="header" view="page" print-force="true">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" FillColor="255,255,204" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目を表示する明細行 データソースの件数分表示されます。-->

        <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>

(41行目抜粋)

<flow-table name="flowtable3" line-height="12" record-type="header" view="page" print-force="true">

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample5_true.pdf』)


flow-areaサンプル8

【print-force属性をfalseに指定した場合】

明細データが0件の場合に、ページヘッダを表示しないサンプルです。

flow-areaSample5-page_false.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample5-page_false.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="frame0" x="5" y="290" width="200" height="280" master-reference="table1-csv" no-data-disabled="false" header-footer-order="layout-only-bottom">
        <!--会社情報を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable1" line-height="50" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="45" X="0" Y="3" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="100" Height="10" X="5" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="85" Height="10" X="110" Y="35" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Square Width="190" Height="25" X="5" Y="7" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <GroupAlignment Width="200" Height="50" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="none" Narrow="none">
                    <Label Width="15" X="8" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">顧客名</Label>
                    <Label Name="Customer Name" Width="70" X="28" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="112" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">発効日</Label>
                    <Label Name="ISSUE DATE" Width="55" X="132" Y="38.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Width="15" X="8" Y="25" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">住所</Label>
                    <Label Name="Customer Address1" Width="70" X="28" Y="24.648" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address2" Width="70" X="28" Y="17" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                    <Label Name="Customer Address3" Width="70" X="28" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <!--分類を表示するヘッダー 全体で一度だけ表示されます。-->

        <flow-table name="flowtable2" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="none">売上明細</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目名を表示するページヘッダー ページ毎に表示されます。-->

        <flow-table name="flowtable3" line-height="12" record-type="header" view="page" print-force="false">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" FillColor="255,255,204" LineStyle="Solid"/>

                <Label Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品コード</Label>
                <Label Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">商品名</Label>
                <Label Width="15" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">単価</Label>
                <Label Width="15" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">数量</Label>
                <Label Width="15" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <!--明細項目を表示する明細行 データソースの件数分表示されます。-->

        <flow-table name="flowtable4" line-height="12" record-type="details" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label Name="商品コード" Width="25" X="3" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="商品名" Width="15" X="32" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="8" FontStyle="PLAIN" Narrow="none"/>
                <Currency Name="単価" Width="25" X="95" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="数量" Width="20" X="130" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                <Currency Name="金額" Width="42" X="155" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>

(41行目抜粋)

<flow-table name="flowtable3" line-height="12" record-type="header" view="page" print-force="false">

生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample5_false.pdf』)


flow-areaサンプル9

flow-areaサンプル6

flow-areaに複数の小計行を表示するサンプルです。
店舗の小計(背景色が黄色)とエリアの小計(背景色がピンク色)を表示します。

flow-areaサンプル6-doc.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample6-doc.xml』)


<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:document-properties-set>
        <bs:document-view initial-page="1" disposition="two-column-left" menubar="true" toolbar="true" window-ui="true" thumbnail="false" full-screen="false" fit-window="false" center-window="false"/>

    </bs:document-properties-set>
    <bs:datasource-master-set>
        <bs:csv-resource-master master-name="csv-resource" url="${base-dir}/sample/xml/flow-area/area_sales.csv" included-header="true"/>

        <bs:datasource-master master-name="csv-source" position="inherit">
            <!-- 小計という名称で定義。集計するキーは「製品コード」と「製品名」を設定。このうちどちらかが変わったら集計する -->

            <bs:calculate-master master-name="小計(店舗)" break-list="店舗">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="小計(店舗)" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:calculate-master master-name="小計(エリア)" break-list="エリア">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="小計(エリア)" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:calculate-master master-name="合計">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="合計" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:group-suppress name="エリア" conditions="or">
                <bs:group-items column-name="エリア" new-page="false"/>

                <bs:group-items column-name="店舗" new-page="false"/>

            </bs:group-suppress>
            <bs:csv-master-reference master-reference="csv-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="csv-field" used-header="false">
            <bs:csv-statement master-reference="csv-resource"/>

            <bs:data-type column-name="エリア" column-no="1" type="char"/>
            <bs:data-type column-name="店舗" column-no="2" type="char"/>
            <bs:data-type column-name="製品名" column-no="3" type="char"/>
            <bs:data-type column-name="金額" column-no="4" type="integer"/>
        </bs:csv-master>
    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4縦" page-height="297mm" page-width="210mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4縦" name="bizsheet" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container>
                <bs:include href="${base-dir}/sample/xml/flow-area/flow-areaSample6-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

flow-areaサンプル6-page.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample6-page.xml』)



<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="area" x="5" y="290" width="200" height="280" master-reference="csv-source" no-data-disabled="false">
        <flow-table name="レイアウトヘッダ" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="horizon" text-align="left" cell-align="bottom" narrow="size">
                <Label Width="200" Height="14" X="0" Y="0" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="24" FontStyle="PLAIN" Narrow="horizon">店舗・エリア別製品売上票</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="page-header2" line-height="12" record-type="header" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label X="10" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">エリア</Label>
                <Label X="40" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">店舗</Label>
                <Label X="100" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">製品名</Label>
                <Label X="170" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="明細行" line-height="10" record-type="details" view="layout">
            <flow-table-cell cell-width="30" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="エリア" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="30" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="店舗" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="92.103" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="製品名" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="47.911" border-color="0,0,0" align="horizon" text-align="right" cell-align="center" narrow="size">
                <Currency Name="金額" X="-2" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
        <flow-table name="小計(店舗)" line-height="10" record-type="subtotal" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="255,255,204" align="none" text-align="left" cell-align="bottom" narrow="none">
                <GroupAlignment Width="198" Height="10" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label Width="25" Height="5" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">小計(店舗):</Label>
                    <Currency Name="小計(店舗)" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <flow-table name="小計(エリア)" line-height="10" record-type="subtotal" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="255,204,204" align="none" text-align="left" cell-align="bottom" narrow="none">
                <GroupAlignment Width="198" Height="10" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label Width="25" Height="5" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">小計(エリア):</Label>
                    <Currency Name="小計(エリア)" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <flow-table name="合計" line-height="10" record-type="total" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="204,255,204" align="none" text-align="left" cell-align="bottom" narrow="none">
                <GroupAlignment Width="198" Height="10" X="0" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label X="0" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="horizon">合計:</Label>
                    <Currency Name="合計" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>


生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample6.pdf』)

flow-areaサンプル10
flow-areaサンプル10

flow-areaサンプル7

flow-areaのsubtotal行にブレイクキーの値を表示するサンプルです。

  1. 集計定義のブレイクキーをレイアウトにひもづけます。本サンプルはブレイクキーを「店舗」にした例です。
    ブレイクキーはセミコロン(;)で区切り、複数のカラムを指定することができます。 ページレイアウトで複数のブレイクキーを表示する場合は、Labelなどで「name="keyN"」(Nは0 からの整数値)のように指定します。
    flow-areaサンプル7
  2. 出力結果
    flow-areaサンプル7

flow-areaサンプル7-doc.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample7-doc.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:document-properties-set>
        <bs:document-view initial-page="1" disposition="two-column-left" menubar="true" toolbar="true" window-ui="true" thumbnail="false" full-screen="false" fit-window="false" center-window="false" print-scaling="" print-duplex="" picktray-bysize="" numofcopies="" pagerange=""/>

    </bs:document-properties-set>
    <bs:datasource-master-set>
        <bs:csv-resource-master master-name="csv-resource" url="${base-dir}/sample/xml/flow-area/area_sales.csv" included-header="true"/>

        <bs:datasource-master master-name="csv-source" position="inherit">
            <!-- 小計という名称で定義。集計するキーは「製品コード」と「製品名」を設定。このうちどちらかが変わったら集計する -->

            <bs:calculate-master master-name="小計(店舗)" break-list="店舗">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="小計(店舗)" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:calculate-master master-name="小計(エリア)" break-list="エリア">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="小計(エリア)" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:calculate-master master-name="合計">
                <bs:calculate-statement function="sum(金額)"/>

                <bs:calculate-function column-name="合計" function="sum(金額)"/>

            </bs:calculate-master>
            <bs:group-suppress name="エリア" conditions="or">
                <bs:group-items column-name="エリア" new-page="false"/>

                <bs:group-items column-name="店舗" new-page="false"/>

            </bs:group-suppress>
            <bs:csv-master-reference master-reference="csv-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="csv-field" used-header="false">
            <bs:csv-statement master-reference="csv-resource"/>

            <bs:data-type column-name="エリア" column-no="1" type="char"/>
            <bs:data-type column-name="店舗" column-no="2" type="char"/>
            <bs:data-type column-name="製品名" column-no="3" type="char"/>
            <bs:data-type column-name="金額" column-no="4" type="integer"/>
        </bs:csv-master>
    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4縦" page-height="297mm" page-width="210mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4縦" name="bizsheet" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container>
                <bs:include href="${base-dir}/sample/xml/flow-area/flow-areaSample7-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

flow-areaサンプル7-page.xml(『<biz-Stream_home>/sample/flow-area/flow-areaSample7-page.xml』)


<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="210mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <flow-area name="area" x="5" y="290" width="200" height="280" master-reference="csv-source" no-data-disabled="false">
        <flow-table name="レイアウトヘッダ" line-height="14" record-type="header" view="layout">
            <flow-table-cell cell-width="200" align="horizon" text-align="left" cell-align="bottom" narrow="size">
                <Label Width="200" Height="14" X="0" Y="0" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="24" FontStyle="PLAIN" Narrow="horizon">店舗・エリア別製品売上票</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="page-header2" line-height="12" record-type="header" view="page">
            <flow-table-cell cell-width="200" align="none" text-align="left" cell-align="bottom" narrow="none">
                <Square Width="200" Height="10" X="0" Y="0" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

                <Label X="10" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">エリア</Label>
                <Label X="40" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">店舗</Label>
                <Label X="100" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">製品名</Label>
                <Label X="170" Y="3.5" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">金額</Label>
            </flow-table-cell>
        </flow-table>
        <flow-table name="明細行" line-height="10" record-type="details" view="layout">
            <flow-table-cell cell-width="30" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="エリア" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="30" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="店舗" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="92.103" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size">
                <Label Name="製品名" X="2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            </flow-table-cell>
            <flow-table-cell cell-width="47.911" border-color="0,0,0" align="horizon" text-align="right" cell-align="center" narrow="size">
                <Currency Name="金額" X="-2" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
            </flow-table-cell>
        </flow-table>
        <flow-table name="小計(店舗)" line-height="10" record-type="subtotal" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="255,255,204" align="none" text-align="left" cell-align="bottom" narrow="none">
                <GroupAlignment Width="198" Height="10" X="0" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label Name="key0" Height="5" X="5" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
                    <Label Height="5" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">店</Label>
                    <Label Height="5" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">小計:</Label>
                    <Currency Name="小計(店舗)" Height="0" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <flow-table name="小計(エリア)" line-height="10" record-type="subtotal" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="255,204,204" align="none" text-align="left" cell-align="bottom" narrow="none">
                <GroupAlignment Width="198" Height="10" X="0" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label Name="key0" Height="5" X="5" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
                    <Label Height="5" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">エリア</Label>
                    <Label Height="5" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon">小計:</Label>
                    <Currency Name="小計(エリア)" X="0" Y="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
        <flow-table name="合計" line-height="10" record-type="total" view="layout" border-color="0,0,0">
            <flow-table-cell cell-width="200" border-color="0,0,0" background-color="204,255,204" align="none" text-align="left" cell-align="center" narrow="none">
                <GroupAlignment Width="198" Height="10" X="0" Y="0" Horizon="right" Vertical="center" Vector="horizon" LineSpace="5mm" Narrow="size">
                    <Label X="0" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="horizon">合計</Label>
                    <Currency Name="合計" X="0" Y="0" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none" format="#,##0"/>
                </GroupAlignment>
            </flow-table-cell>
        </flow-table>
    </flow-area>
</Layout>


生成されるPDF(『<biz-Stream_home>/sample/flow-area/flow-areaSample7.pdf』)


flow-areaサンプル10
flow-areaサンプル10

multi-columnサンプル1

clone属性を使用し、表を段組にするレイアウトです。

multi-columnサンプル1-dog.xml(『<biz-Stream_home>/sample/flow-area/multi-columnSample1-doc.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:datasource-master-set>
        <bs:datasource-master master-name="csv-data" position="inherit">
            <bs:group-suppress>
            </bs:group-suppress>
            <bs:csv-master-reference master-reference="csv-field"/>

        </bs:datasource-master>
        <bs:csv-master master-name="csv-field" used-header="true">
            <bs:csv-statement master-reference="csv-resource"/>

            <bs:data-type column-name="7月1日" column-no="1" type="char"/>
            <bs:data-type column-name="(火)" column-no="2" type="char"/>
            <bs:data-type column-name="天気" column-no="3" type="char"/>
            <bs:data-type column-name="晴" column-no="4" type="char"/>
            <bs:data-type column-name="最高気温" column-no="5" type="char"/>
            <bs:data-type column-name="35.6 " column-no="6" type="char"/>
            <bs:data-type column-name="℃" column-no="7" type="char"/>
            <bs:data-type column-name="入場者数" column-no="8" type="char"/>
            <bs:data-type column-name="177,708"" column-no="9" type="char"/>
            <bs:data-type column-name="人" column-no="10" type="char"/>
        </bs:csv-master>
        <bs:csv-resource-master master-name="csv-resource" url="${base-dir}\sample\xml\flow-area\mobil.csv" included-header="false"/>

    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="a4-yoko" page-height="210mm" page-width="297mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="a4-yoko" name="bizsheet" bs:local-page-control="none" target-source="csv-data">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container master-reference="csv-data">
                <bs:include href="${base-dir}\sample\xml\flow-area\multi-columnSample1-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>


multi-columnサンプル1-page.xml(『<biz-Stream_home>/sample/flow-area/multi-columnSample1-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="297mm" Height="210mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <Square Width="267.758" Height="13.053" X="13.758" Y="190.244" LineColor="0,0,0" LineWidth="0.5" LineStyle="Solid"/>

    <Label Width="250.119" Height="9.172" X="19.05" Y="192.008" Horizon="center" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="15" FontStyle="PLAIN" Narrow="horizon">brainsellersフォーラム/動員者数統計</Label>
    <flow-area name="flow-area" x="8.819" y="185" width="141" height="174" master-reference="csv-data" no-data-disabled="true">
        <flow-table line-height="18.697" record-type="details" view="layout">
            <flow-table-cell cell-width="141" border-width="0.25" border-color="153,153,153" align="horizon" text-align="left" cell-align="bottom" narrow="size">
                <Label Name="7月1日" Width="19.05" Height="10" X="2.117" Y="6" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="15" FontStyle="PLAIN" Narrow="horizon"/>
                <Label Name="(火)" Width="13.758" Height="10" X="4.233" Y="6" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="天気" Width="27" Height="7.7" X="6.35" Y="9" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="晴" Width="14.817" Height="7" X="-14.5" Y="2" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="最高気温" Width="27" Height="7.7" X="-2.822" Y="9" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="35.6 " Width="8.467" Height="7" X="-22.931" Y="2" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="℃" Width="6.35" Height="7" X="-22" Y="2" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Rate="100" Narrow="none"/>
                <Label Name="入場者数" Width="27" Height="7.7" X="-8.819" Y="9" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontColor="0,0,0" FontSize="12" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="177,708"" Width="16.581" Height="7" X="-30" Y="2" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
                <Label Name="人" Width="12.7" Height="7" X="-32" Y="2" Horizon="left" Vertical="center" Vector="horizon" Font="MSGothic" FontSize="11" FontStyle="PLAIN" Narrow="none"/>
            </flow-table-cell>
        </flow-table>
    </flow-area>
    <flow-area name="flow-area" x="150.989" y="185" width="141" height="174" no-data-disabled="false" clone="flow-area">
        <!-- clone属性により親の"frow-area"の設定を引き継いで表示されます。-->

    </flow-area>
</Layout>

clone 属性を使用すると、すでに配置されているflow-area の書式を参照することができます。 段組の右側の表は、書式の詳細をレイアウトファイル中に記載することなしに、clone 属性を使用し、左側 の表の書式を参照しています。

生成されるPDF(『<biz-Stream_home>/sample/flow-area/multi-columnSample1.pdf』)


flow-areaサンプル4
flow-areaサンプル5

clone 属性を使用する場合、flow-area の name 属性はページ内で統一してください。

name属性の注意点