Jet Reports contains the Export to Word feature, which helps to bring data from your database into a new or existing MS Word document.For example, we want to create an account statement showing customer information such as contact information, customer’s outstanding balance, and details about any open invoices that customer may have:
We will continue with Jet Report containing the data we want to include in our Account Statement.
We will put the report in design mode to create a list of outstanding invoices for various customers. Then, we’ll select Configure Word Export from the Jet ribbon.
We will define the data we require in our Word document by utilizing the Ranges tab of the Configure Word Export window.For example, we will start by defining the customer no. by entering the Name CustomerNo and then, for the Cell Reference, clicking on the cell that contains the data we want:
We created our invoice list using NL(Rows), which is a replicating function. We want to select all the cells containing the data AND the next blank row, as well. This blank row which is known as the “anchor row” 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 open Microsoft Word where we can use all of Word’s functionalities to create our document – e.g., include a logo, add a heading, etc.Then we will navigate to Jet ribbon in Word and use the Insert Range button to include any of our defined Ranges in our document.
We can start adding on more Ranges in our document and complete the reports.
Save and close the Word document. Head over to Excel and provide Name and location of output document then click Save.
Now, we can run the report to gather our data and then select Generate Word Document from the Jet ribbon:
A dialog appears when the document is completely generated. 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: