ProReport - Create a report specification
API Url
Use it to create a new report specification
http://localhost:16010/ProMarkREST/web/ProReport/reports
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| reports | Object[] | |
attributesoptional | Object[] | Report dynamic attributes. |
descriptionoptional | string | Attribute description |
| id | string | Attribute Id |
| type | Number | attribute type |
| value | string | Attribute Value |
| definition | Object | Report definition object. |
descriptionoptional | string | Report specification description. |
| name | string | Report specification name. |
pageNameoptional | string | Report page name. |
pageTextoptional | string | Report page text. |
reportNameoptional | string | Report name. |
reportTextoptional | string | Report text. |
transactionIdoptional | string | Report transaction Id. |
| type | Number | Report type. |
| groups | Object[] | Report groups. |
| calculation | string | Group calculation. |
descriptionoptional | string | Group description. |
| display | boolean | true - group is visible, false - group is not cisible. |
| id | Number | Group number. |
| textId | string | System text id. |
| texttype | string | System text type. |
| id | string | The id of the report. |
| layout | Object | Report layout object. |
| col1 | string | Col1 label |
| col2 | string | Col2 label |
| columns | Object[] | Report column object. |
| format | string | Column format |
| formula | string | Column formula |
| id | Number | Column id |
| text | string | Column header |
| displayDetails | Boolean | TRUE=Show detail lines |
| footerCalculation | string | footer calculation |
| onlyShowCalc | String | Comma separated list of columns that will display data only for the group calculation |
| onlyShowDetails | String | Comma separated list of columns that will display data only for the details section |
| showDate | Boolean | TRUE=Show report execution date |
| showLogo | Boolean | TRUE=Show logo on page header |
| showPageNumber | Boolean | TRUE=Show page number on footer |
| showSignatureSection | Boolean | TRUE=Show section for signature on report footer |
| parentId | String | The parent id of the report. |
Request example:
{"request": {"data": {"reports": {"id": "Absence01-01","parentId": "Absence01","definition": {"name": "Absence rules on totals 120 days amttest","description": "Shows absence where the total days in the period is 120 or more amttest","pageName": "Absence rules on totals 120 days amttest","pageText": "Shows absence where the total days in the period is 120 or more amt test","reportName": "","reportText": "","transactionId": "","type": 0},"groups": [{"id": 1,"description": "Current department ID,Current department description","textId": "ttAbsIntv.DeptId,ttAbsIntv.DeptDescription","textType": "Other","calculation": "SUM","display": true},{"id": 2,"description": "Age","textId": "AGE","textType": "SortEmp","calculation": "SUM","display": true}],"layout": {"columns": [{"id": 1,"text": "No. of dayss","format": "202","formula": "$"}],"onlyShowCalc": "","onlyShowDetails": "","displayDetails": true,"showSignatureSection": false,"showLogo": true,"showPageNumber": true,"showPhDate": true,"col1": "Period start","col2": "Period end","footerCalculation": "SUM"},"attributes": [{"id": "DayLimitMethod","description": "Specify day count limit check","value": "3","readOnly": true,"type": 4,"options": [{"value": 1,"description": "<"},{"value": 2,"description": "="},{"value": 3,"description": ">"}]},{"id": "DayLimit","description": "Day count limit","value": "121","readOnly": true,"type": 2},{"id": "OnlyOpenEndedPer","description": "Only open ended period","value": "true","readOnly": true,"type": 1},{"id": "InclOffDays","description": "Include off-days","value": "true","readOnly": true,"type": 1},{"id": "SepAbsIntv","description": "Check individual intervals","value": "true","readOnly": true,"type": 1},{"id": "ExtAbsIntvBefore","description": "Extend interval back in time","value": "true","readOnly": true,"type": 1},{"id": "ExtAbsIntvAfter","description": "Extend interval forward in time","value": "true","readOnly": true,"type": 1}]}}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |