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
.parameter("Cascading_name_single_select", "A & U Stalker Telecommunications, Inc")
215
+
.run();
216
+
```
207
217
Also you can use this method to run report with several values for the same parameter. In this case new values of the parameter are added to the previous ones (new values do not replace previous values of the parameter):
208
218
```java
209
219
OperationResult<InputStream> result = client
@@ -217,6 +227,7 @@ OperationResult<InputStream> result = client
217
227
.parameter("Country_multi_select", "USA")
218
228
.run();
219
229
```
230
+
Please notice, if you pass zero as number of page, you will get all pages of report.
220
231
In this mode you don't need to work in one session. In the above code we specified report URI, format in which we want to get a report and some report parameters. As we a result we got `InputStream` instance. In synchronous mode as a response you get a report itself while in asynchronous you get just a descriptor with report ID which you can use to download report afer it will be ready.
221
232
222
233
In order to run a report in asynchronous mode, you need firstly build `ReportExecutionRequest` instance and specify all the parameters needed to launch a report. The response from the server is the `ReportExecutionDescriptor` instance which contains the request ID needed to track the execution until completion and others report parameters. Here's the code to run a report:
@@ -226,7 +237,7 @@ ReportExecutionRequest request = new ReportExecutionRequest();
In the above code we've created `ReportExecutionRequest` instance and sent it to JR server through the `newReportExecutionRequest` method. As a response we've got `OperationResult` instance which contains HTTP response wrapper and instance of `ReportExecutionDescriptor` which we can get with `operationResult.getEntity()`.
After running a report and downloading its content in a given format, you can request the same report in other formats. As with exporting report formats through the user interface, the report does not run again because the export process is independent of the report.
Copy file name to clipboardExpand all lines: src/integration-test/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/reporting/ReportingServiceIT.java
0 commit comments