Jaspersoft / jrs-rest-java-client

Java Rest Client for JasperReports Server
GNU Lesser General Public License v3.0
100 stars 101 forks source link

ExportDescriptor shows id="pdf" #39

Closed mortias closed 10 years ago

mortias commented 10 years ago

Running this code gives me the ReportExecutionDescriptor, however in the ExportDescriptor it states id="pdf" ... i guess this should be outputFormat?

=> exports=[ExportDescriptor{id='pdf', status='execution', pages='null', attachmentsPrefix='null', outputResource=null, attachments=null}]}

    ReportExecutionRequest request = new ReportExecutionRequest();
    request.setReportUnitUri("/reports/samples/StandardChartsReport");
    request
            .setAsync(true)                       
            .setFreshData(true)
            .setParameters(new ReportParameters(params))
            .setIgnorePagination(true)
            .setOutputFormat("pdf");           

    OperationResult<ReportExecutionDescriptor> operationResult =
            session                
                    .reportingService()
                    .newReportExecutionRequest(request);

    ReportExecutionDescriptor reportExecutionDescriptor = operationResult.getEntity();
    System.out.println(reportExecutionDescriptor.getRequestId());

ReportExecutionDescriptor{currentPage=null, reportURI='/reports/samples/StandardChartsReport', requestId='909127166_1408649034809_24', status='ready', totalPages=1, exports=[ExportDescriptor{id='pdf', status='execution', pages='null', attachmentsPrefix='null', outputResource=null, attachments=null}]}

Krasnyanskiy commented 10 years ago

That’s right.

See XML example at the end of the page: https://community.jaspersoft.com/documentation/jasperreports-server-web-services-guide/v56/running-report-asynchronously

export id is outputFormat.

mortias commented 10 years ago

now i see :) correct.