Currency サンプル1
Currency サンプル1
(『<biz-Stream_home>/sample/xml/Currency/CurrencySample1.xml
』)
<?xml version="1.0" encoding="UTF-8"?> <!-- XML file created by biz-Stream Designer --> <!-- biz-Stream Copyright BrainSellers.com Corp. --> <Layout Name="CurrencySample1" Width="70" Height="80" X="10" Y="10" 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="40" Height="60" LineColor="14,0,176" LineStyle="Solid"/> <!-- (1)Currency1 --> <Currency Name="Currency1" X="10" Y="50" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" color-plus="0,0,255" color-minus="255,0,0" Narrow="horizon" format="#,##0">1234</Currency> <!-- (2)Currency2 --> <Currency Name="Currency2" X="10" Y="40" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" color-plus="0,0,255" color-minus="255,0,0" Narrow="horizon" format="#,##0">-1234</Currency> <!-- (3)Currency3 --> <Currency Name="Currency3" X="10" Y="30" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" color-plus="0,0,255" color-minus="255,0,0" Narrow="horizon" format="\#,##0-">1234</Currency> <!-- (4)Currency4 --> <Currency Name="Currency4" X="10" Y="20" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" color-plus="0,0,255" color-minus="255,0,0" Narrow="horizon" format="$#,##0.##">1234.12</Currency> <!-- (5)Currency5 --> <Currency Name="Currency5" X="10" Y="10" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" color-plus="0,0,255" color-minus="255,0,0" Narrow="horizon" format="$#,##0.##">1234.1234</Currency> </Layout>
生成されるPDF
(『<biz-Stream_home>/sample/xml/Currency/CurrencySample1.pdf
』)

- ①Currency1:表示形式指定なし(「#,##0」指定に等しい)
データがプラスであるため、フォントカラーは青 - ②Currency2:表示形式指定なし(「#,##0」指定に等しい)
データがマイナスであるため、フォントカラーは赤 - ③Currency3:表示形式「\#,##0-」
- ④Currency4:表示形式「$#,##0.##」
- ⑤Currency5:表示形式「$#,##0.##」
小数点第2位までしか指定がないため小数点第3位以下は銀行方式の丸めを行う
表示形式の指定は、Java API仕様(Decimal Format)に準拠します。
詳細は、Java API仕様をご参照ください。