...
Sl.No | Field Name | Description |
---|---|---|
1 | Connection Name | Provide the appropriate connection name |
2 | Host Name | This is the name of server to which designer tool connects to. In this case, we are connecting to 'localhost'. |
3 | Database Name | Provide the database name to which designer tool needs to connect. In MifosX, we generally connect to the database 'mifostenant-default' |
4 | Connection Type | In the left column, please select the appropriate connection type(in this case, mysql) . Once you select 'mysql' the Port Number automatically selected as 3306. |
5 | User Name | Provide the mysql username( in this case it is 'root') |
6 | Password | Provide the mysql password. |
5. As shown in the following window click on '+' button to add the sql query.
6. Here, Provide the Sql Query Name and write the appropriate Sql Query and then click on 'Preview' button to confirm the Sql query executed successfully. Then click on 'Ok' button.
Info | ||
---|---|---|
| ||
select mc.firstname,mc.lastname,mc.account_no from m_client mc |
7.
7. Add Global scripting
Copy this content into it
// This is a template to demonstrate the existing functions function init(dataRow) // this method is called once when the data-source is first used. function shutdown() // this method is called once during the data-source shut-down. It } |
8. Once you create executable Sql Query, you may have to add parameters if required. In order to embed Pentaho Report to MifosX, At least you have to create 3 parameters which are passed to MifosX, namely
- tenantUrl
- username username
- password.
To add parameters, under the 'Data' tab, scroll down to see 'parameters' and then right click on 'parameters' and then click on 'Add parameter' to see the following window.
Sl.No | Parameter Name | Parameter Fields |
---|---|---|
1 | tenantUrl | Name:tenantUrl Label:Tenant Db Value type: String Default Value: jdbc:mysql://localhost:3306/mifostenant-default Check mandatory |
2 | username | Name:username Default Value: root |
3 | password | Name:password Default Value: mysql Check Mandatory Field |
...
4 | startDate (For this example) | Name:startDate Display Type: Date Picker |
5 | endDate (For this example) | Name:endDate Display Type: Date Picker |
Basically these three parameters are required to embed Pentaho Report in MifosX. Similarly, you can define more parameters as per requirement of the report.
89. Once you add the parameters, you need to check whether the report is working fine in the pentaho environment. First, You need to add the Report fields into 'Details' section of the pentaho environment. In our example, the fields 'firstname', 'lastname' and 'account_no' of the clients are added. In order to add them you need to drag each field in 'Details' section of the pentaho environment as shown in following two screenshots.
...
9 10. Next you need to click on 'Run' button and choose appropriate format for the report.
10 11. Once you 'Run' the report by choosing appropriate format, the following window should open where you enter the parameters and generate the report. (In this case, PDF is selected)
1112. If you click on 'Ok' button and PDF is generated, it means Pentaho Report is created successfully.
1213. You need to save the report with '.prpt' extension. In order to do it, Just go to the 'File' menu and click on 'Save' button.
IV. Embedding Pentaho Report in MifosX
...
3. Go to Community-app and then go to Admin >> System >> Manage Reports and click '+Create Report' to see the following window.
4. Ensure 'Report Name' should be the same as the pentaho report file name (that is in this example, Activated Clients.prpt).
...