mifosx-195 report maintenance (fixed)

This commit is contained in:
John Woodlock
2013-05-06 23:18:55 +01:00
parent 5a2acd7897
commit 3fbd32918f
5 changed files with 158 additions and 63 deletions
+40 -24
View File
@@ -11198,17 +11198,19 @@ POST reports
Content-Type: application/json
Request Body:
{
reportName: "myReport",
reportType: "Table",
reportCategory: "My Category",
description: "sample non-core report",
reportSql: "select 'hello'",
useReport: false
"reportName":"Completely New Report",
"reportType":"Table",
"reportSubType":"",
"reportCategory":"Loan",
"useReport":"false",
"description":"Just\nAn\nExample",
"reportSql":"select 'very good sql' as AComment",
"reportParameters":[{"id":"","parameterId":"5","reportParameterName":""},{"id":"","parameterId":"6","reportParameterName":""}]
}
</code>
<code class="method-response">
{
"resourceId": 100
"resourceId": 132
}
</code>
</div>
@@ -11239,7 +11241,8 @@ GET https://DomainName/api/v1/reports
"useReport": true,
"reportParameters": [
{
"id": 5,
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
@@ -11249,32 +11252,38 @@ GET https://DomainName/api/v1/reports
"reportName": "Client Loans Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t have that client browser/memory impact).",
"coreReport": true,
"description": "Individual Client Report\n\nPretty \n\nwide report that lists the basic details of client loans. \n\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t have that client browser/memory impact).",
"coreReport": false,
"useReport": true,
"reportParameters": [
{
"id": 5,
"id": 2,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
},
{
"id": 6,
"id": 3,
"parameterId": 6,
"parameterName": "loanOfficerIdSelectAll"
},
{
"id": 10,
"id": 4,
"parameterId": 10,
"parameterName": "currencyIdSelectAll"
},
{
"id": 20,
"id": 5,
"parameterId": 20,
"parameterName": "fundIdSelectAll"
},
{
"id": 25,
"id": 6,
"parameterId": 25,
"parameterName": "loanProductIdSelectAll"
},
{
"id": 26,
"id": 7,
"parameterId": 26,
"parameterName": "loanPurposeIdSelectAll"
}
]
@@ -11304,12 +11313,13 @@ GET https://DomainName/api/v1/reports/{id}
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).",
"reportSql": "select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \u0027%\u0027)\r\nand \n\nounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, \u0027%\u0027)\r\njoin m_client c on c.office_id \u003d ounder.id\r\nwhere o.id \u003d ${officeId}\r\nand c.is_deleted\u003d0\r\n\n\norder by ounder.hierarchy, c.account_no",
"reportSql": "select \nconcat(repeat(\"..\", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as \"Office/Branch\",\n c.account_no as \"Client Account No.\", \nc.display_name as \"Name\", \nr.enum_message_property as \"Status\",\nc.activation_date as \"Activation\", c.external_id as \"External Id\"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \u0027%\u0027)\nand ounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, \u0027%\u0027)\njoin m_client c on c.office_id \u003d ounder.id\nleft join r_enum_value r on r.enum_name \u003d \u0027status_enum\u0027 and r.enum_id \u003d c.status_enum\nwhere o.id \u003d ${officeId}\norder by ounder.hierarchy, c.account_no",
"coreReport": true,
"useReport": true,
"reportParameters": [
{
"id": 5,
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
@@ -11331,20 +11341,26 @@ GET https://DomainName/api/v1/reports/{id}
PUT https://DomainName/api/v1/reports/{id}
</code>
<code class="method-request">
PUT reports/100
PUT reports/129
Content-Type: application/json
Request Body:
{
reportCategory: "My Category updated",
useReport: true
"reportName": "New rpt name",
"reportParameters": [
{
"id": 194,
"parameterId": 5,
"reportParameterName": "m"
}
]
}
</code>
<code class="method-response">
{
"resourceId": 100,
"resourceId": 129,
"changes": {
"reportCategory": "My Category updated",
"useReport": true
"reportName": "New rpt name",
"reportParameters": "[{\"id\":194,\"parameterId\":5,\"reportParameterName\":\"m\"}]"
}
}
</code>