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
We are using the jrs-rest-java-client, version 5.5.0 (https://github.com/Jaspersoft/jrs-rest-java-client ) to schedule a
Job on the Jasper (Tomcat) Server. The problem is, though the job is created on the server, the report parameters are
all null.
private void scheduleJob(String reportUri, Map parameters) {
Job job = new Job();
job.setLabel("New Job for ISS Report");
job.setDescription("New Job for the report template: " + reportUri);
JobSource jobSource = new JobSource();
jobSource.setReportUnitURI(reportUri);
jobSource.setParameters(new HashMap(parameters));
job.setSource(jobSource);
Set outputFormats = new HashSet();
outputFormats.add(OutputFormat.PDF);
outputFormats.add(OutputFormat.XLSX);
job.setOutputFormats(outputFormats);
RepositoryDestination repositoryDestination = new RepositoryDestination();
repositoryDestination.setSaveToRepository(true);
repositoryDestination.setFolderURI("/scheduled_reports");
job.setRepositoryDestination(repositoryDestination);
SimpleTrigger trigger = new SimpleTrigger();
trigger.setStartType(SimpleTrigger.START_TYPE_NOW);
trigger.setOccurrenceCount(1);
trigger.setRecurrenceInterval(0);
trigger.setRecurrenceIntervalUnit(IntervalUnitType.DAY);
job.setTrigger(trigger);
job.setBaseOutputFilename("portiss_report" + System.currentTimeMillis());
clientSessionForAsynchronousRequest.jobsService().scheduleReport(job);
}
However, we have a bad work-around, by changing the JobsService in jrs-rest-java-client. The above code works if I replace:
long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReport(job);
With:
long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReportWithHack(job);
// long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReport(job);
Hello,
We are using the jrs-rest-java-client, version 5.5.0 (https://github.com/Jaspersoft/jrs-rest-java-client ) to schedule a
Job on the Jasper (Tomcat) Server. The problem is, though the job is created on the server, the report parameters are
all null.
This is the client code:
private Session clientSessionForAsynchronousRequest;
However, we have a bad work-around, by changing the JobsService in jrs-rest-java-client. The above code works if I replace:
long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReport(job);
With:
long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReportWithHack(job);
// long jobId = clientSessionForAsynchronousRequest.jobsService().scheduleReport(job);
Also, I have forked the project on git-hub, and you will find my changes here:
https://github.com/paawak/jrs-rest-java-client
Thanks,
Palash.
The text was updated successfully, but these errors were encountered: