Jump to content
We've recently updated our Privacy Statement, available here ×

simon.devineau

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by simon.devineau

  1. Hello, I am developing a Java webservices to call your webservices and execute report. I would like to run report asyncronously and get the report later (15 min for example). My problem is, accoding to your tutorial, you need to retrieve report from the same java session instance. I would like to know if it is possible to retrieve a report by creating a new session but with the same info (sessionId etc ..). I cannot save the java session instance but i can save the sessionID. //Runa report Session session = JasperClient.getInstance().authenticate(LOGIN, PASSWORD);ReportExecutionRequest request = new ReportExecutionRequest(); request.setReportUnitUri(TEST_REPORT); request.setAsync(true).setOutputFormat(OutputFormat.PDF.toString()); OperationResult<ReportExecutionDescriptor> operationResult = session.reportingService() .newReportExecutionRequest(request); return operationResult.getEntity();// I have the requestId now//later in the time Session session = JasperClient.getInstance().authenticate(LOGIN, PASSWORD);//It is a different session, so it won't work//How should I do ? ReportingService reportingService = session.reportingService(); ReportExecutionRequestBuilder reportExecutionRequest = reportingService .reportExecutionRequest(reportExecutedDescriptor.getRequestId()); List<ExportDescriptor> exports = reportExecutedDescriptor.getExports(); if (exports != null && exports.size() > 0) { String exportId = exports.get(0).getId(); ExportExecutionRequestBuilder export = reportExecutionRequest.export(exportId); OperationResult<InputStream> operationResult = export.outputResource(); return operationResult.getEntity(); }[/code] Regards Simon
×
×
  • Create New...