Overviews
Document Generation
Introduction
Automated Lease Document Generation (Document Generation, DocGen) is an optional module that allows a user to request variety of documents (such as lease, agreements, collection letters, and invoices) for a particular workflow module or client from within LeasePak. This module is used in conjunction with dxGeneration (included with DocGen but setup separately and available with LeasePak client). Users can generate document on demand and in batches (scheduled batches (multiple letters, invoices, etc.)). To generate documents in a batch use dxGeneration which is part of Automated Lease Document Generation module.
DocGen and dxGeneration takes a Microsoft Word template (*.docx file ), merge it with the appropriate LeasePak data, and produce a Word document (*.pdf or *.docx file) that you can modify, save, print, e-mail, or process the same way you would process any other Word document.
Supported Workflow Modules: Users can access generated documents on demand or in a batch as per user needs by using DocGen or dxGeneration. The supported workflow modules are: Application, Collection, Customer Service, Insurance, Maturing Lease, Recovery, Lease Summary, and Collateral.
To generate documents users must purchase Automated Lease Document Generation module.
To generate documents by Document Generation module users must have knowledge and expertise of following:
- Extensible Markup Language (XML) - Attributes, Elements, and XPath Expressions
- Structured Query Language (SQL) - Basic Select Statement (FROM, WHERE, GROUP BY, & ORDER BY), Join Command
- Microsoft Open Office Template - Content Controls, Open XML Power Tolls
System Requirements
In order to use Document Generation, you must have the following installed on your LeasePak client computer:
- Automated Lease Document Generation Module (Users must purchase this module of LeasePak application)
- Microsoft Word (Word 2007 and above) Doc Gen generates .pdf files. If MS Word is not installed then it will generate a .docx type of document
For more information on installing Automated Lease Document Generation, refer to LeasePak Client in the System Administration Guide
LeasePak Setup Requirements
Users must setup following to use Document Generation:
- Security: U0706 Security→Individual/Role
You must have access to U0736 Document update to merge the retrieved data from database and to generate a document. Also, set Menu Security item Letters and Documents [S02], as well as access to the appropriate tracking module (Application, Collateral, Collections, Customer Service, Insurance, Mature Lease, or Recovery) in order to generate documents belonging to that module from within LeasePak. Refer to Security [U0706] for more information.
Application U0831: To generate Application document list from within LeasePak, you must also have access to the Documents and Tasks item on the Application Tracking menu. You can establish access to menu items and document lists through the Security and Letters/Doc tabs of Application User Profile [U0831], respectively.
- U0712 Custom General→Document Generation Customizations
Specify the document template location and file attachment location for DocGen.
- Application Tracking →Document List
Before using the Documents and Tasks function from the Application Tracking menu, you must set up at document list. Document lists specify which sets of application documents are required prior to moving an application to a certain status. You can also set up document lists not tied to the status movement of an application. For more information, refer to Application Document List [U0815].
- Other Tracking Modules
To generate documents from the other tracking modules, no additional setup is required.
Automated Lease Doc
In the Application Tracking module, you can generate DocGen document lists through the
Documents and Tasks list. From all other tracking modules, you can generate documents by clicking
on the tracking module toolbar.
When you click
from a tracking module,
LeasePak displays the following screen:

Click
to access
the list of generated documents that can be used by the workflow module. Once you have selected a document, clear the Create Attachment checkbox if document is not required for file attachment. This checkbox will be selected by default. Click on OK to proceed further.
How to generate a document
This section explains how to generate a document by using DocGen and dxGeneration. For more information, contact your NETSOL representative.
Following are the steps to generate a document by using DocGen:
- Create the static form of the document.
- Identify the information required from the database.
- Identify the database column names for the text required from the database.
- Identify which tracking module you want to use your document template with. Document generation works with LeasePak tracking modules only. Each tracking module works with a different component of LeasePak: Application, Lease, Lessee, and Asset. The selected tracking module component will become the base parameter for document generation.
- Write SQL select statements.
- ROOT Level SQL: Write ROOT level SQL by using the identified base parameter in the SQL select statement argument.
- Level 1 SQLs: Write level 1 SQLs for the identified database fields. Use the base parameter from ROOT SQL to retrieve information from the database.
- Relationship of ROOT level and level 1 SQL: ROOT level SQL contains the identified base parameter of the document, whereas the level 1 SQL validates the ROOT level SQL argument parameter to retrieve data from the database. The base parameter determines the purpose of the document and is used to generate documents by DocGen or dxGeneration.
- Use U0736 Document to add a document.
- Map SQL select statement column names into XML elements.
- Use XML elements to create an XPath expression.
- Use the XPath expression to create a content selector.
- Replace identified text with the content selector and XPath expression.
- Save your document template in .docx form.
- Use U0712 Custom General to define the document template directory location.
- Use U0736 Document to generate the document.
For detailed description of these steps, refer to the examples section of this document.
Examples
The following examples explain how to generate a document step by step: