Edit

Design a new ER configuration to generate reports in Word format

Note

Community interest groups have now moved from Yammer to Microsoft Viva Engage. To join a Viva Engage community and take part in the latest discussions, fill out the Request access to Finance and Operations Viva Engage Community form and choose the community you want to join.

To generate reports as Microsoft Word documents, design a template for the reports by using, for example, the Word desktop application. The following illustration shows the sample template for the control report that you can generate to show details of processed vendor payments.

Screenshot of the sample template for the control report in the Word desktop application.

To use a Word document as a template for reports in Word format, configure a new Electronic reporting (ER) solution. This solution must include an ER configuration that contains an ER format component.

Note

When you create a new ER format configuration to generate reports in Word format, select Word as the format type in the Create configuration dropdown list or leave the Format type field blank.

Screenshot of creating a format configuration on the Configurations page.

The ER format component of the solution must contain the Excel\File format element. Link that format element to the Word document that you use as the template for generated reports at runtime. To configure the ER format component, open the draft version of the created ER configuration in the ER format designer. Then add the Excel\File element, attach your Word template to the editable ER format, and link that template to the Excel\File element that you added.

Note

When you attach a template, use a document type that is previously configured in the ER parameters to store templates of ER formats.

Screenshot of attaching a template on the Format designer page.

You can add Excel\Range and Excel\Cell nested elements for the Excel\File element to specify the structure of data to enter in generated reports at runtime. You must then bind those elements to data sources of the editable ER format to specify the actual data to enter in generated reports at runtime.

Screenshot of adding nested elements on the Format designer page.

When you save your changes to the ER format at design time, the hierarchical format structure is stored in the attached Word template as a custom XML part that is named Report. You must access the modified template, download it from Finance, store it locally, and open it in the Word desktop application. The following illustration shows the locally stored sample template for the control report that contains the Report custom XML part.

Screenshot of previewing the sample report template in the Word desktop application.

When bindings of Excel\Range and Excel\Cell format elements run at runtime, the data that every binding delivers comes into the generated Word document as an individual field of the Report custom XML part. To enter the values from the fields of the custom XML part in a generated document, add the appropriate Word content controls to your Word template to serve as placeholders for data that's filled in at runtime. To specify how content controls are filled in, map every content control to the appropriate field of the Report custom XML part.

Screenshot of adding and mapping content controls in the Word desktop application.

You must then replace the original Word template of the editable ER format with the modified template that now contains Word content controls that were mapped to the fields of the Report custom XML part.

Screenshot of replacing the template on the Format designer page.

When you run the configured ER format, the attached Word template is used to generate a new report. The actual data is stored in the Word report as a custom XML part that is named Report. When the generated report is opened, the Word content controls are filled in with data from the Report custom XML part.

Frequently asked questions

Question: I configured an ER format to print a Word document that contains a company address. In the Word template for this ER format, I inserted a rich text content control to present a company address. In Finance, I entered the company address as multiline text and selected Enter to add a carriage return for every line that I entered. Therefore, I expect the company address to appear as multiline text in generated documents. However, the address appears as a single line of text that contains special symbols instead of carriage returns. What is wrong with my settings?

Answer: Instead of using a rich text content control, use a plain text content control and select the Allow carriage returns (multiple paragraphs) check box in the control's properties.

Additional resources