はじめに
SAP FormsByAdobeのテンプレートを作るにあたって、繰り返し表現実行するための方法を記載します。
作成ツール:Adobe LiveCycle Designer
ページの繰り返し設定
1.ページのサブフォームタブにある「コンテンツ内での改ページを許可」をチェック
2.連結タブにある「各データアイテムについてサブフォームを繰り返す」をチェック
3.適当なxmlのパラメータを渡して、PDFページが繰り返し表示されているか確認する。
<Form>
<P1>
<txtSubject>Page Loop1</txtSubject>
</P1>
<P1>
<txtSubject>Page Loop2</txtSubject>
</P1>
<P1>
<txtSubject>Page Loop3</txtSubject>
</P1>
</Form>
PDFプレビューで確認すると、渡したパラメータ3ページ分が表示されている。
テーブル行の繰り返し設定
1.繰り返し対象の行を選択した状態で、オブジェクトタブ内の連結タブにある「各データアイテムについて行を繰り返す」をチェック
2.適当なxmlのパラメータを渡して、テーブル行が繰り返し表示されているか確認する。
<Form>
<P1>
<Table>
<Row>
<cel1>Table Loop1_1</cel1>
<cel2>Table Loop2_1</cel2>
<cel3>Table Loop3_1</cel3>
<cel4>Table Loop4_1</cel4>
</Row>
<Row>
<cel1>Table Loop1_2</cel1>
<cel2>Table Loop2_2</cel2>
<cel3>Table Loop3_2</cel3>
<cel4>Table Loop4_2</cel4>
</Row>
<Row>
<cel1>Table Loop1_3</cel1>
<cel2>Table Loop2_3</cel2>
<cel3>Table Loop3_3</cel3>
<cel4>Table Loop4_3</cel4>
</Row>
<Row>
<cel1>Table Loop1_4</cel1>
<cel2>Table Loop2_4</cel2>
<cel3>Table Loop3_4</cel3>
<cel4>Table Loop4_4</cel4>
</Row>
<Row>
<cel1>Table Loop1_5</cel1>
<cel2>Table Loop2_5</cel2>
<cel3>Table Loop3_5</cel3>
<cel4>Table Loop4_5</cel4>
</Row>
</Table>
</P1>
</Form>
PDFプレビューで確認すると、渡したパラメータ5行分が表示されている。
フォームの繰り返し設定
1.図のようなサブフォームを作成し、コンテンツをフローレイアウトに設定する。
※フローレイアウトに設定しておかないと、オブジェクトが同じ場所で繰り返し出力されてしまうので注意。
2.繰り返し対象のサブフォームを選択し、「各データアイテムについてサブフォームセットを繰り返す」をチェック
3.適当なxmlのパラメータを渡して、フォーム(テーブル)が繰り返し表示されているか確認する。
<Form>
<P1>
<SubForm>
<Loop>
<Table>
<Row>
<cel1>Table Loop1_1</cel1>
<cel2>Table Loop2_1</cel2>
<cel3>Table Loop3_1</cel3>
<cel4>Table Loop4_1</cel4>
</Row>
<Row>
<cel1>Table Loop1_2</cel1>
<cel2>Table Loop2_2</cel2>
<cel3>Table Loop3_2</cel3>
<cel4>Table Loop4_2</cel4>
</Row>
<Row>
<cel1>Table Loop1_3</cel1>
<cel2>Table Loop2_3</cel2>
<cel3>Table Loop3_3</cel3>
<cel4>Table Loop4_3</cel4>
</Row>
</Table>
<Table>
<Row>
<cel1>Table Loop1_4</cel1>
<cel2>Table Loop2_4</cel2>
<cel3>Table Loop3_4</cel3>
<cel4>Table Loop4_4</cel4>
</Row>
<Row>
<cel1>Table Loop1_5</cel1>
<cel2>Table Loop2_5</cel2>
<cel3>Table Loop3_5</cel3>
<cel4>Table Loop4_5</cel4>
</Row>
<Row>
<cel1>Table Loop1_6</cel1>
<cel2>Table Loop2_6</cel2>
<cel3>Table Loop3_6</cel3>
<cel4>Table Loop4_6</cel4>
</Row>
</Table>
<Table>
<Row>
<cel1>Table Loop1_7</cel1>
<cel2>Table Loop2_7</cel2>
<cel3>Table Loop3_7</cel3>
<cel4>Table Loop4_7</cel4>
</Row>
<Row>
<cel1>Table Loop1_8</cel1>
<cel2>Table Loop2_8</cel2>
<cel3>Table Loop3_8</cel3>
<cel4>Table Loop4_8</cel4>
</Row>
</Table>
</Loop>
</SubForm>
</P1>
</Form>
PDFプレビューで確認すると、渡したパラメータ3テーブル分が表示されている。
最後に
今回は、繰り返し表示にフォーカスをあててみまた。
今後もAdobe LiveCycle Designerの知っていると便利な機能を紹介していきたいと思います。