Profit REST Service ReportConnector
Connector for generating and retrieving a Profit report.
You can only call the ReportConnector if it has been activated in the App connector.
In Profit, authorisation applies to reports and to the contents of reports. This authorisation also applies if you retrieve a report using the ReportConnector.
- The user linked to the token must be authorised to view the report.
- The user linked to the token only sees those lines of the report for which he is authorised.
The following applies to reports of the sales invoice type. The connector requires administration settings for generating these reports. For this, the connector uses the settings of the last administration to which the user was logged on.
Note:
You cannot view a report with an initial screen using the ReportConnector. An initial screen is a custom-made screen with settings and filters which you use to determine the content of a report.
Contents |
Preparations for the ReportConnector in Profit
You retrieve the GUID of the report because you need it for the call. If you want to apply a filter to the report, you also retrieve the codes of the fields that you want to use in the filter.
To find the report ID:
- Go to: General / Output / Management / Report.
- Add a new view.
- Include the ID field in the view:
Profit includes the 'GUID' in the view. Look up the ‘GUID’ of the report that you want to retrieve.
To retrieve field codes for a filter:
When applying a filter in the ReportConnector, you must use the field codes that are in the report.
- Go to: General / Output / Management / Report.
- Open the report:.
- Click on: Modify. This opens the data collection.
- Click repeatedly on: Next.
- Click on: Example.
- Press: Ctrl+Shift+I.
You see a window with the field codes.
- Copy the correct field code to a filter for the ReportConnector call.
Run a ReportConnector
- Call the Profit REST Services.
- Call:
../ProfitRestServices/reportconnector/ReportGUID
Example:
../ProfitRestServices/reportconnector/F890829D4FE3DA0A7FBCDEBA980B813D
Run a ReportConnector with a filter
Use a filter to include only specific data in the report.
See also the explanation and additional fields for the GetConnector.
'Is equal to' filter on one value:
Call:
../ProfitRestServices/reportconnector/ReportGUID?filterfieldids=fieldid&filtervalues=value&operatortypes=type
Example:
You filter on employee BARTD.
../ProfitRestServices/reportconnector/F890829D4FE3DA0A7FBCDEBA980B813D?filterfieldids=EmId&filtervalues=BARTD&operatortypes=1
AND filter (filter on multiple fields):
You filter on multiple fields using an 'is equal to' filter. Records must match all filter criteria.
Call:
../ProfitRestServices/reportconnector/ReportGUID?filterfieldids=fieldid,fieldid&filtervalues=value,value&operatortypes=type,type
Use a comma as the separator between the fields and between the filter values.
Example:
You filter on employees of department ONTTEAM and the MEDPRO job.
../ProfitRestServices/reportconnector/9FCF692141693C5BCC9E5BB042336648?filterfieldids=U009,U011&filtervalues=ONTTEAM,MEDPRO&operatortypes=1,1