Fragment layouts provide capability of binding a dynamic
table's fields to collection DDEs. At the time of letter generation
table rows are generated according to the size of collection DDEs.
This story describes the steps required to create a dynamic table
using fragment layout. To create a form: From LiveCycle
Designer, create a Form. For example, add a table containing a single
row with four columns.
Select the Include Header Row in Table option and
add fields to all table columns. Ensure following:
Binding of all the four fields, their container row, and
table is set to use name.
Layout of table’s parent subform is flowed. Set the layout
using Subform tab under object properties.
Table row is repeatable. Go to Binding tab under object properties
and select Repeat Row for Each Data Item.
Save the form, for example DynamicTable.xdp.
Create fragment layout using this XDP: Name this fragment
layout (for example DynamicTable) and select the template you created
in the previous procedure (for example, DynamicTable.xdp). No customization
is required.
Save the fragment layout.
Create a Data Dictionary, for example you can create one
containing customer name, account id, balance, and transaction id.
Create a letter template. For main layout, select any layout
that contains at least one target area of sufficient size to accommodate
table.
Select the Data Dictionary you created in step 3.
Go to content tab and map the fragment (such as DynamicTable)
to the target area.
Go to field map, and map table columns to the DDEs such as
customer name, account id, balance, and transaction id. These DDEs
are collection DDEs (unless there is only a single row) which have
multiple values (in the XML used for populating values) for each
of them. All the table columns are mapped to primitive collection
DDEs with same parent collection DDE so that they have same cardinality.
Save the letter and render it into PDF. At the time of rendering,
table rows are repeated depending on the values provided in the
XML for the collection DDEs.
For details on expressions supported by collection variables,
see Supporting expressions
for collection variables.
|
|
|