Hi folks,
I am using jasper server version : 4.5.0.
I have developed a report using iReport and sucessfully deployed on jasper server, also created a schedular which emails report in pdf file as attachment.
Now we have a requirement to send email with email id taken from database table(say user_master).. The report has 1 parameter i.e branch_no which is present in user_master.
The schedular is exected to query the table get emailids, parameter from current record, give parameter(branch_id) to report, generate report and send mail to users...based on mail id in current records.. I am Not able to do this part, as i am not able to find any references for this.
Any ideas or workarounds....?
Regards,
Santosh.
1 Answer:
Your best bet to do what you need is to trigger the report from the outside with a script that looks into the DB and creates all the scheduled jobs using the Jasperserver API. Check the "jobs" function on the Jasperserver Web Services Guide.
http://community.jaspersoft.com/sites/default/files/docs/jasperreports-server-web-services-guide.pdf (this link is for the 4.7 version you should be able to find the 4.5 version in the /docs folder of your JasperServer Install Path)