biz-Streamマニュアル PDF出力ガイド 第4章 文字修飾動的変更機能編 4.3.1 アプリケーションデータソース

4.3.1 アプリケーションデータソース

アプリケーションデータソースではHashtableType tableに

table.put("NAME::FontColor","0,0,255");
と登録し、複数のHashtableTypeを包含した RecordTypeをsetDataSource()でbiz-Streamに与えます。
<サンプル>
//  アプリケーションデータソースとしてデータを渡します。
RecordType records = new RecordType();
HashtableType values;

//1件目 values = new HashtableType();
values.put("INVOICE NO",new StringType("AA0001"));
values.put("MODEL",new StringType("MODEL01"));
values.put("SEIHAN NO",new StringType("1000"));
//INVOICE NO の文字色を R=200,G=100,B=50 に
values.put("INVOICE NO::FontColor",new StringType("200,100,50"));
records.add(values);

//2件目 values = new HashtableType();
values.put("INVOICE NO",new StringType("BB0001"));
values.put("MODEL",new StringType("MODEL02"));
values.put("SEIHAN NO",new StringType("1010"));
//INVOICE NO の文字色を blue に
values.put("INVOICE NO::FontColor",new StringType("blue"));
records.add(values);
....
xml.setDataSource("application-data-resource",records);