Report instance allows you to export your report to different file formats. The report layout and style along with the data gets exported to the specified format. Export service enables the end user to render and export a specified report to desired format using the specified instance id. You can create a client application to send an HTTP request to the service application for using the report services.
To export the report instance with report filter and option using the specified instance id, you need to use GET method. Report full path and instance id of executing report is specified in the request URL, as follows:
GET: http://<host>[:port]/api/report/{folder path}/{report name}/$instances/{instance id}/export
Request URL: https://developer.mescius.com/componentone/demos/aspnet/5/c1webapi/latest/api/report/ReportsRoot/FlexCommonTasks/FlexCommonTasks.flxr/Simple20%List$instances/21c2fa46-0a75-4708-acf2-454668eac4cb/export?format=html&exportFileName=Simple List
Parameters
Parameter | Description |
---|---|
Report Full Path | Specify the full path of the executing report. For example: FlexCommonTasks.flxr/MultiValue DataBound Parameters |
Instance Id | Specify the instance id of the executing report. |
Format | Specify the supported format. For example: HTML |
Export File Name | Specify a suitable name for the exported file. |
Export Options | Specify the export options. For example: outputRange=1&... |
Response Messages
HTTP Status Code | Reason |
---|---|
200 | The exported file stream. |
404 | The report path or instance id does not exist or the request page range is not rendered. |
406 | The format name is not acceptable/supported. |
To export the report instance with report filter and option using the specified instance id, you need to use POST method. Report full path and instance id of executing report is specified in the request URL, as follows:
POST: http://<host>[:port]/api/report/{folder path}/{report name}/$instances/{instance id}/export
Request URL: https://developer.mescius.com/componentone/demos/aspnet/5/c1webapi/latest/api/report/ReportsRoot/FlexCommonTasks/FlexCommonTasks.flxr/Simple20%List/Simple List$instances/21c2fa46-0a75-4708-acf2-454668eac4cb/export
Parameters
Parameter | Description |
---|---|
Report Full Path | Specify the full path of the executing report. For example: FlexCommonTasks.flxr/MultiValue DataBound Parameters |
Instance Id | Specify the instance id of the executing report. |
Format | Specify the supported format. For example: HTML |
Export File Name | Specify a suitable name for the exported file. |
Export Options | Specify the export options. For example: outputRange=1&... |
Response Messages
HTTP Status Code | Reason |
---|---|
200 | The exported file stream. |
404 | The report path or instance id does not exist or the request page range is not rendered. |
406 | The format name is not acceptable/supported. |
For more information about Report Instances. see WebApiExplorer Demo.