bs:group-suppressサンプル
このサンプルでは顧客名をブレイク条件に小計と最後に合計を出力します。
bs:group-suppressサンプル
(『<biz-Stream_home>/sample/xml/datasource-master/datasource-masterGroupSuppressSample1-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-source" position="inherit"> <bs:group-suppress name="a" conditions="or"> <bs:group-items column-name="顧客名" priority="1" 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="integer"/> <bs:data-type column-name="金額" column-no="3" type="decimal"/> </bs:csv-master> <bs:csv-resource-master master-name="csv-resource" url="${base-dir}/sample/xml/datasource-master/sample.csv" included-header="true"/> </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" bs:local-page-control="none"> <fo:flow flow-name="xsl-region-body"> <bs:block-container> <bs:include href="${base-dir}/sample/xml/datasource-master/datasource-masterGroupSuppressSample1-page.xml"/> </bs:block-container> </fo:flow> </fo:page-sequence> </fo:root>
(8行目抜粋)
<bs:group-items column-name="顧客名" priority="1" new-page="false"/>
(『<biz-Stream_home>/sample/xml/datasource-master/datasource-masterGroupSuppressSample1-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"> <Label Name="タイトル" Width="176.056" Height="10.915" X="14.085" Y="278.169" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="18" FontStyle="PLAIN" Narrow="horizon">販売集計(今月)</Label> <flow-area name="area" x="28.575" y="268.963" width="150.989" height="200.025" master-reference="csv-source" no-data-disabled="false"> <flow-table name="header" line-height="9.507" record-type="header" view="layout" border-width="0.1" border-color="0,0,0" background-color="204,255,204"> <flow-table-cell cell-width="46.831" align="horizon" text-align="left" cell-align="center" narrow="size"> <Label Width="46.831" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="horizon">企業名</Label> </flow-table-cell> <flow-table-cell cell-width="46.831" align="horizon" text-align="left" cell-align="center" narrow="size"> <Label Width="46.831" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="horizon">販売台数</Label> </flow-table-cell> <flow-table-cell cell-width="46.831" align="horizon" text-align="left" cell-align="center" narrow="size"> <Label Width="46.831" Horizon="center" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="14" FontStyle="PLAIN" Narrow="horizon">金額</Label> </flow-table-cell> </flow-table> <flow-table name="deatils" line-height="9.507" record-type="details" view="layout" border-width="0.1"> <flow-table-cell cell-width="46.831" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size"> <Label Name="顧客名" Width="46.831" X="1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/> </flow-table-cell> <flow-table-cell cell-width="46.831" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size"> <Currency Name="個数" Width="45.5" X="1" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="#,##0">123456</Currency> </flow-table-cell> <flow-table-cell cell-width="46.831" border-color="0,0,0" align="horizon" text-align="left" cell-align="center" narrow="size"> <Currency Name="金額" Width="45.5" X="0" Horizon="right" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon" format="\#,##0">123456</Currency> </flow-table-cell> </flow-table> </flow-area> </Layout>
(20行目抜粋)
<Label Name="顧客名" Width="46.831" X="1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
取りまとめたい項目名をグループサプレスで指定します。
枠線の情報はflow-table-cellに指定に従います。
生成されるPDF
(『<biz-Stream_home>/sample/xml/datasource-master/datasource-masterGroupSuppressSample1.pdf
』)
取りまとめる項目を「顧客名」としているため、「顧客名」ごとに取りまとめて出力します。
枠線はflow-table-cellで指定した枠線情報を使用します。
