You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,37 @@ There is no additional configuration needed!
21
21
22
22
### `ReportingClient`
23
23
#### Methods
24
+
***constructor(ReportingClientOptions)**
25
+
Creates a reporting client instance with the given `serverUrl`. Note this should be the root of your site where you host the REST service and should **not** include `/api/reports` in it.
26
+
Also you can send `additionalHeaders` which will be sent with every request. Useful for sending authentication in case your reporting service requires authentication.
Gets an array of supported document export formats by the server. This method can be called without registering the client. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-general-api-get-document-formats))
29
+
***register(): Promise<void>**
30
+
Registers the client with the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-api-register-client))
31
+
***unregister(): Promise<void>**
32
+
Unregisters the client from the servers. You need to call this once you finished using the reporting client so it can free up resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-api-unregister-client))
Gets info about the parameters for the given reports. Also can be used to check the validity of the given parameters for the given report. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-parameters-api-get-report-parameters))
Creates a `ReportingInstance` that can be used to render and download reports from the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-instances-api-create-report-instance))
Creates a `ReportingDocument` with the given export format. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-request-document))
42
+
***destroy(): Promise<void>**
43
+
Destroys the reporting instance from the server. It is important to call this method once you finish your work so it can free the resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-report-instances-api-destroy-report-instance))
27
44
28
45
### `ReportingDocument`
29
46
#### Methods
47
+
***getInfo(): Promise<DocumentInfo>**
48
+
Gets info about the rendered report document, for example if it is ready on the server, how many pages it has, etc.([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-get-document-info)
49
+
***download(File?): Promise<File>**
50
+
Downloads the prepared document from the server. By default it names the file with `documentId` adds an appropriate extension and saves the file in the device specific temp folder. In case you need to save the file somewhere else, or need to name it differently you can send a `File` instance to this method.
51
+
***getPage(number): Promise<PageInfo>**
52
+
Gets information about the given page. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-get-document-info))
53
+
***destroy(): Promise<void>**
54
+
Destroys the reporting document from the server. It is important to call this method once you finish your work so it can free the resources on the server. ([API Reference](https://docs.telerik.com/reporting/telerik-reporting-rest-documents-api-destroy-document))
30
55
31
56
## Usage
32
57
A typical usage scenario is when you want to generate a report on your server and the download the file in an appropriate format (for example a PDF document). Below is an example how you can make this. You start by creating a client with your server's URL. Then you register your client, create an instance and a document. Finally you download the document to the mobile device.
0 commit comments