Updating the data source for a report template

When you have created a modified report and its corresponding report template document, the report definition data embedded into the report template document matches the layout of the modified report. If you make additional changes to the modified report, such as adding additional fields to layout, the report definition data embedded into the report template won’t have those changes.

Rather than having to re-create the report template document, you can replace the embedded report definition data with an updated version. To do this, complete the following procedure.

  1. Update the modified report.

Make the additional changes to the modified report. Be sure the report is working correctly.

  1. Export the XML representation of the report.

In Microsoft Dynamics GP, run the modified report. In the Report Destination window, set the Report Type to Standard. Mark the File check box, specify XML Data file as the export format, supply a filename for the export file, and then click OK.

The XML data file for the report has two main sections. The first section contains the report definition information, while the second section has actual data for the report. The updated report definition section is what must be embedded into the report template document.

  1. Open the report template document.

In Microsoft Word, open the report template document for which you want to replace the report definition information.

  1. Select the XML resource containing the report definition.

Display the Developer tab, and then click Field List in the Microsoft Dynamics GP Templates group. The Custom XML Mapping pane will be displayed. In the XML Resource drop-down list, select the XML resource for the report.

  1. Remove the XML resource.

In the Microsoft Dynamics GP Templates group, click Remove Source. A message will be displayed warning of possible missing data. Click OK to remove the source.

  1. Add the updated report definition.

In the Microsoft Dynamics GP Templates group, click Add Source. In the file dialog displayed, locate the XML data file you exported for the revised modified report. Select the file and click Open.

  1. Select the updated XML resource.

In the Custom XML Mapping pane, use the XML Resource drop-down list to select the updated XML resource for the report. The Report Section and Fields lists should contain items that match the revised report definition.

  1. Make the changes to the report template.

Using the techniques and guidelines described in Report Template Design make the necessary changes to the report template document to match the changes you made to the modified report.


Documentation Feedback