To help automate the process of getting information out of our ERP system and including that information in existing or new MS Word documents, Jet Reports includes the Export to Word feature.
For our example, let's assume we want to create an Account Statement which shows some customer contact information, that customer's outstanding balance, and details about any open invoices that customer may have:
This video provides a step-by-step overview of configuring the Export to Word feature of Jet Reports.
We'll start with a Jet report which contains the data we want to include in our document.
Since our list of outstanding invoices can vary in length from customer to customer, we'll put the report in Design mode so that it's easier to work with and access all the areas we'll want.
Then, we'll select Configure Word Export from the Jet ribbon.
On the Ranges tab of the Configure Word Export window, we'll begin to define the data we want to include in our Word document.
For example, we'll start by defining the customer number by entering the Name CustomerNo and then, for the Cell Reference, clicking on the cell that contains the data we want:
Since our invoice list is created by a replicating function [ in this case, NL("Rows") ], we want to select all the cells containing the data AND the next blank row, as well. This blank row is referred to as the "anchor row" and its location will move as the number of invoices returned by the NL("Rows") function expand and contract.
Once we have defined all the Ranges we need (and Charts, if our report includes them), we can define the Word template itself. On the Template tab, click Edit Template.
This will display Microsoft Word. Here, we can use all of Word's capabilities to create our document - e.g., include a logo, add a heading, etc.
Then from the Jet ribbon in Word, we can use the Insert Range button to include any of our defined Ranges in our document.
Once we're done, we can see that our document is beginning to take shape. Our text is present and our report data is represented by the Range names that we defined and placed in the document:Note: In most cases, the format of the inserted ranges is preserved from what was specified in Excel. If you need to modify the format of that data (such as bold or italics), you must do this in the Excel report.
Once we close the Word document, we can click Save on the Configure Word Export window.
Now, we can run the report to gather our data and then select Generate Word Document from the Jet ribbon:
A dialog appears letting us know that the document is being created. Once the document is ready, we can click on Open File to open it.
Microsoft Word opens and the data from our report is included in the document we defined: