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

ashcsi1322

Members
  • Posts

    8
  • 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 ashcsi1322

  1. Hi All, I fixed the following issue. There is no need to add $mailNotification object in the constructor. But it can be set after creating the job object for e.g.: $job->mailNotification; thanks ashy
  2. Hi All, I am using the latest jrs php client. On selecting the following option: Run until a specified date: And entering the simpleEndDate I am writing the following code : $trigger = new SimpleTrigger(); $trigger->startType = $scheduleTrigger['startType']; if ($scheduleTrigger['startType'] == 2) { $trigger->startDate = $scheduleTrigger['startDate']; } $trigger->recurrenceInterval = $scheduleTrigger['interval']; $trigger->recurrenceIntervalUnit = $scheduleTrigger['intervalUnit']; if (!empty($scheduleTrigger['occurrenceCount'])) { $trigger->occurrenceCount = $scheduleTrigger['occurrenceCount']; } if (!empty($scheduleTrigger['endDate'])) { $trigger->endDate = $scheduleTrigger['endDate']; } Note, that I am not setting $trigger->occurrenceCount, when setting the trigger endDate. But it returns an unknown http status code and does not create a job. After adding the following line: if (!empty($scheduleTrigger['endDate'])) { $trigger->occurrenceCount = 1; $trigger->endDate = $scheduleTrigger['endDate']; } It creates a job successfully. But I think it is not intended to work like that. Could anyone let me know if I am missing something when using Schedule end date for simple trigger ? thanks ashy
  3. Hi All, I am using the latest jrs php client. To get job details I am using the following code: $jobs = $this->_client->jobService()->searchJobs($uri); [/code]But the above code returns instance of JobSummary class. How do I get other details of the entire Job like trigger, source, repository destination etc ? thanks ashy
  4. Hi All, I have downloaded the latest v2 jrs-rest-php-client-master.zip file and started using it. But while going through the Job class I found that its constructor is not setting the $mailNotification object in the constructor. The code is as mentioned below: /** * Mail notification settings * @var MailNotification */ public $mailNotification; public function __construct($label = null, $trigger = null, $source = null, $baseOutputFilename = null, $outputFormats = null, $repositoryDestination = null) { $this->label = $label; $this->trigger = $trigger; $this->source = $source; $this->baseOutputFilename = $baseOutputFilename; $this->outputFormats = $outputFormats; $this->repositoryDestination = $repositoryDestination; }[/code]This might cause problem for users who want to set up mailnotification while scheduling reports/jobs. Could anyone let me know if it is indeed missing to update the mailNotification object or is intended to work as it is ? Thanks Ashy
  5. Hi Grantbacon, Thanks for your suggestion. I will try the latest version. Is it possible to attach calendar control to a job in the latest api? Could you please refer to an example doing it? Thanks Ashy
  6. Hi All, I am using the php client rest api to schedule a report. I am using the following code to achieve this : $result = new JasperJob(); $result->baseOutputFilename = $reportDet['baseOutputFilename']; $result->label = $reportDet['label']; $result->description = $reportDet['description']; $result->repositoryDestination['folderURI'] = $repositoryDestination['folderURI']; $result->repositoryDestination['overwriteFiles'] = (!empty($repositoryDestination['overwriteFiles'])) ? 'true' : 'false'; $result->repositoryDestination['sequentialFilenames'] =(!empty($repositoryDestination['sequentialFilenames'])) ? 'true' :'false'; $result->outputFormats['outputFormat'] = $outputFormat['outputFormat']; $result->source['reportUnitURI'] = $source['reportUnitURI']; $result->source['parameters'] = array( 'REPORT_TIME_ZONE' => array('Asia/Kolkata'), 'status' => array('A') ); $result->simpleTrigger['occurrenceCount'] = $simpleTrigger['occurrenceCount']; $result->simpleTrigger['recurrenceInterval'] = $simpleTrigger['interval']; $result->simpleTrigger['recurrenceIntervalUnit'] = $simpleTrigger['intervalUnit']; $result->simpleTrigger['startDate'] = $simpleTrigger['startDate']; $result->simpleTrigger['timezone'] = $simpleTrigger['timezone']; $result->mailNotification['toAddresses']['address'] = $mailNotification['toAddresses']; $result->mailNotification['subject'] = $mailNotification['subject']; $result->mailNotification['messageText'] = $mailNotification['messageText']; $result->mailNotification['resultSendType'] = 'SEND_ATTACHMENT'; $this->_client->putJob($result);[/code] Using the code above report is getting sent correctly as an attachment. But the attachment is empty. Could anyone let me know what I am missing ? Also, I am using older version of php client PHP Client (v1.0) Published: 2012-Nov-12 and the jasper server version is 5.0.0. Can that also be a part of the problem ? thanks ashy
  7. Hi All, I am using jasper server 5.0.0 community edition. I have the following smtp settings report.scheduler.mail.sender.host=smtp.gmail.comreport.scheduler.mail.sender.username=xxxreport.scheduler.mail.sender.password=xxxreport.scheduler.mail.sender.from=xxxreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=587report.scheduler.web.deployment.uri=http://ipaddress:8084/jasperserver[/code] But I am getting the following exception when the job is complete 2014-11-07 11:12:41,568 ERROR ReportExecutionJob,quartzScheduler_Worker-1:306 - The job error notification was not completed. An error occurred while sending it.java.lang.NullPointerException at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:557) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:416) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl.sendMailNotification(ReportExecutionJobMailNotificationImpl.java:123) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:931) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:526) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:217) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)[/code]Could anyone let me know the cause of this NullPointerException. Thanks
  8. Hello, Is it possible to write a conditional query in Ireport query executer? For e.g.: something like IF $P{TEST_PARAM}.equals("test") select query ELSE select query END IF Also the value for the parameter should come from the input control. thanks for the help!
×
×
  • Create New...