Wednesday 1 July 2015

Add Fields from a Report Dataset to a Word Report Layout

A report dataset can consist of fields that display labels, data, and images. This topic describes procedure for adding fields of a report dataset to an existing Word layout of a report. You add fields by using the Word custom XML part for the report and adding content controls that map to the fields of the report dataset.

To display the Custom XML part for the Report in Word



  1. Open the Word report layout document in Word for editing.

  2. Show the Developer tab in the ribbon of Word.


By default, the Developer tab is not shown in the ribbon.

  1. On the Developer tab, choose XML Mapping Pane.

  2. In the XML Mapping pane, in the Custom XML Part list, choose the XML part for Microsoft Dynamics NAV report. The name of the XML part has the following format:


urn:microsoft-dynamics-nav/reports/report_name/ID

report_name is the name that is assigned to the report as specified by the report's Name Property.

ID is the identification number of the report.
XMLDataSet
After you select the XML part, the XML Mapping pane displays the labels and field controls that are available for the report.

To add a label or data field



  1. Place your pointer in the document where you want to add the control.

  2. In the XML Mapping pane, right-click the control that you want to add, choose Insert Content Control, and then choose Plain Text.


AddDataField






Note

You cannot add a field by manually typing the dataset field name in the content control. You must use the XML Mapping pane to map the fields.

To add repeating rows of data fields to create a list



  1. If not already existing, add a table row that includes a column for each field that you want repeated.


This row will act as a placeholder for the repeating fields.

  1. Select the whole row.

  2. In the XML Mapping pane, right-click the control that corresponds to the report data item that contains the fields that you want repeated, choose Insert Content Control, and then choose Repeating.


AddRepeatingField

  1. Add the repeating fields to the row as follows:




    1. Place your pointer in a column.

    2. In the XML Mapping pane, right-click the control that you want to add, choose Insert Content Control, and then choose Plain Text.



InsertContentField

  1. For each field, repeat steps a and b.

1 comment: