Can we invoke Jaspersoft Report from Gel script and export the report into some format and attach it in email notification?
Appreciate your help on this.
You can call JasperSoft via HTML URL, including report parameters - we do this in several locations in our client PPM sites to run the Status Report from the Project, rather than the user having to navigate back to Advance Reporting (aka JasperSoft).
Though I personally have never called a HTML from a GEL script please see Calling a URL using GEL script.
You may want to consider getting the HTML format correctly working first, before attempting to then develop the GEL script.
Thank you for the suggestion.
We have created the link which will pop-up the Jaspersoft Report screen and run report. There is manual intervention here.
My requirement is to trigger the process which will run the Jaspersoft report for the project and attach the output in PDF/PPT format in email notification. There shouldn't be any manual intervention.
Could you please let me know whether this is possible or not? We are on ODP.
Did you figure out a way I had similar req. Need to run Jaspersoft report and attach it in email and send.
Did you the tried Jaspersoft Report Scheduling option where you can send the report data as an attachment in email based on the input parameters selected in the report.
Thank you for the suggestion.
However, the report scheduling option will not suite my requirement. The jaspersoft report run is based on specific condition. The requirement is, Once the Cost Plan is submitted for approval, the process should get triggered to run Jaspersoft report and send attachment to stakeholders for further validation.
Not yet figured out the solution. Will keep you posted once done.
Thanks, I am working on this workflow, the below link is little helpful for me, Not getting report but able to kick of Advance reporting now want to figure out how we can download in Clarity. Will keep you posted.
Running Jaspersoft Report within CA PPM Object
You should be able to execute Jasper report if you rely on libraries like jaspereports-*.jar. If you want to export the report output you can rely on pdf related jar files which is part of clarity/lib directory.
This link has the java code using classes and methods from jasperreports-*.jar. Check if this kind of jar exists in clarity/lib and utilize those methods to execute the .jrxml file in GEL code.
You can invoke the rest api reports service (i.e. http//<host:<port>/jaspersoftserver[-prod]/rest_v2/reports/path/to/report.<format>?<arguments>) from a gel script (see jaspersoft documentation for more details).
This call is synchronous and you can get the output and attach it to an email.
Since this call is synchronous use with caution and only with fast reports because a bg thread is occupied until the report finishes. If you have many concurrent gel scripts that call a report you could have a degradation of performance.
To run it asynchronously you can look at reportExecutions service.
Jaspersoft rest_v2 documentation is here: REST API Overview | Jaspersoft Community
Thank you for the suggestion. I am working on the solution which you have provided. I will keep you posted on the status.
Retrieving data ...