Using fragments when controlling the display of subforms

The Purchase Order Dynamic.xdp sample form uses fragments to configure the footer to display the correct address, depending on the data being merged with the form. When the sample form is merged with the Purchase Order Canada.xml file, the FooterCanada fragment is instantiated; however, when the form is merged with the Purchase Order US.xml file, the FooterUS is instantiated.

  1. Open Purchase Order Dynamic.xdp and click File > Form Properties > Preview.

  2. In the Data File field, click the Browse button and select the Purchase Order US.xml data file located in EN\Samples\Forms\Purchase Order\Form Fragments\Data.

  3. Click Open and then click OK.

  4. Click the Preview PDF tab in the Layout Editor. Notice that the corporate address in the footer shows an American address.

  5. Click File > Form Properties > Preview.

  6. In the Data File field, click the Browse button and select the Purchase Order Canada.xml data file located in EN\Samples\Forms\Purchase Order\Form Fragments\Data.

  7. Click Open and then click OK.

  8. Click the Preview PDF tab in the Layout Editor. Notice that the corporate address in the footer now shows a Canadian address.

Next, we will view how this choice section was created.

// Ethnio survey code removed