Generate documents as Word or PDF using word templates. These word templates may contain reporting commands specified by the Aspose reporting engine: https://docs.aspose.com/display/wordsnet/Template+Syntax
Let’s build and execute the wordDocGeneratorDef example.
- Create a new definition called “wordDocGeneratorDef”
- Select the definition and click the “design” button
- Drag a wordDocGenerator step to the canvas
- Connect the dots between the start and wordDocGenerator step
- Click on the “wordDocGenerator” step to configure its properties
- Configure the following values for the properties as shown on the below graphic
- Click on the icon to choose the report template for upload. Any previous template shall be replaced by the uploaded file. Click on the template file name to download the file. Click on Remove Template to permanently remove the existing template from the document path on the server.
- Navigate to Advanced tab to configure the data source. The connection string, SQL Query and the datasource name are input as shown below. The result of the SQL query can be accessed through the data source using Aspose syntax.
- The report template format is shown as below.
- Confirm the changes. Save the process definition, create a process instance and execute. The step should generate the Word document / PDF file and update the physical and virtual file path of variables or globals.
- The generated PDF file is saved by the file name as configured above. The content for the example used is as shown below.