ashcsi1322 Posted January 14, 2015 Share Posted January 14, 2015 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 clientPHP Client (v1.0)Published: 2012-Nov-12and the jasper server version is 5.0.0. Can that also be a part of the problem ?thanksashy Link to comment Share on other sites More sharing options...
grantbacon Posted January 17, 2015 Share Posted January 17, 2015 Hi Ashy,I suggest using v2.0.0 (available on github: http://github.com/Jaspersoft/jrs-rest-php-client) with versions 5.0 and greater. Link to comment Share on other sites More sharing options...
ashcsi1322 Posted January 19, 2015 Author Share Posted January 19, 2015 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 Link to comment Share on other sites More sharing options...
grantbacon Posted April 10, 2015 Share Posted April 10, 2015 Hi Ashy,You will be able to attach a Calendar to a Job. You can find the documentation in the latest code in the /docs/ folder which will contain examples of how to do this Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now