It's all about the answers!

Ask a question

Is it possible to run BIRT reports like Cron job or program?


pugazhenthi samidurai (26423742) | asked May 14 '12, 1:55 a.m.
Hi,

Is it possible to get BIRT report results as pdf format.

Without running BIRT report manually (ex. like cron job or programmatically).

Thanks in Advance

One answer



permanent link
James Moody (3.3k24) | answered Jun 18 '12, 10:23 a.m.
JAZZ DEVELOPER
Hi,

Sorry for the delay. When we do the export to PDF from the Web UI, we end up calling com.ibm.team.reports.service.internal.IReportViewerService. You can do this yourself from your cron script. The service sets the appropriate content-type on the response. There are a number of parameters to pass in:

__format=pdf (yes, that's two underscores).
__projectAreaUUID=xxx (pass in the UUID of the project area containing the report)
__ownerUUID=xxx (pass in the UUID of the contributor who is making the request)

Then, there are two options.

(1) You already have a Report saved with the correct parameters, etc. In that case, pass:

__queryUUID=xxx (pass in the UUID of the report (not the report template) that you want to render).

(2) You don't have a Report saved with the correct parameters, etc. In that case, pass:

__reportUUID=xxx (pass in the UUID of the report *template*)
param1=val1
param2=val2 (pass in the report parameters and values by name dynamically for that report)

The call is authenticated the same as all other calls so you'll need to be able to handle either basic or form auth from your script.

Let me know if you have any further questions about this.

james




Comments
EclipseTalk . commented Mar 14 '13, 3:08 p.m.

Hi James,

Can I use the command above to generate the report and save it to a file directly, without getting the Save As dialog or do I need to use the reportrunner program?
Any sample you could share would be appreciated.
Thanks, 

Your answer


Register or to post your answer.