Hatena::ブログ(Diary)

Dieu merci

2011-02-23

任意の場所で改ページ

好きなところで改ページするには、対象のエレメントの、対象の

イベント(On〜)で以下のように記述。

this.getStyle().pageBreakAfter = "Always";

pageBreakBeforeプロパティは前で、

pageBreakAfter プロパティは後で。

グルーバルパラメータに毎回ブレークしたいデータを渡して、

前の値と変わったら、ブレークさせるなど。

グローバル変数作成」

reportContext.setGlobalVariable("currheight", new Float(curh));


「判定。条件に合致したとこで改ページ」

importPackage(Packages.java.lang);

var curh = parseFloat(reportContext.getGlobalVariable("currheight"));

var numofrowsingroup = this.getRowData().getColumnValue("Aggregation");

if( *1 > 6.0 ){

this.getStyle().pageBreakBefore = "Always";

}



種類は、

「Always 」

Always insert a page break before or after the

selected element.

「Auto 」Insert a page break before or after the element

as necessary. Auto is the default value.

「Avoid」 Avoid inserting a page break before or after the

selected element.

「Always Excluding First」 Applies only to groups and Page Break Before.

Always insert a page break before each

instance of the selected group, but not before

the first instance.

「Always Excluding Last」 Applies only to groups and Page Break After.

Always insert a page break after each instance

of the selected group, but not after the last

instance.


f:id:annazola:20110224005440j:image

f:id:annazola:20110224005439j:image

*1:curh)+(numofrowsingroup*.2

スパム対策のためのダミーです。もし見えても何も入力しないでください
ゲスト


画像認証

トラックバック - http://d.hatena.ne.jp/annazola/20110223/1298476774