Calling REST Parameter from Jasper Report?

Calling REST Parameter from Jasper Report?

  
Hello all, 
My situation is the following.  I have a REST call that I want to pass a filter paramater to from Jasper Reports. I unserstand how to create the REST call with the paramater on the Outsystems side (which workd perfectly from the browser), I now need to call the Jasper report using a url with the filter paramater (in this case customer_number) and have Jasper Reports make the REST call using this paramater.  Is anyone else doing anything similar to this?  I have been scowering the Japser Report side but have turned up nothing unless I embed the SQL calls in the Report thus not using REST :-(
Any help would be great!
Thanks in advance!
Chris
Couldn't understand your question very well... you want to call a REST service in your report?

The last time I used JasperReports the available datasources were JDBC, JavaBean, XML, CSV and some other ones.

You can always code it yourself. Make the call to the REST endpoint and then convert it to something that JR understands.

Thanks for the reply!  Yes, I am using a JSON data adapter on the Jasper Report Server side that is assigned to the Jasper Report as its data source.  The REST call (that connects to the JSON data source in Jasper Reports) requires a paramater that needs to be passed from the Jasper Report so I can further filter data from my outsystems application depending on the user.  Does that help?
Thanks again!
Chris
Hi Christopher,

If you need a url parameter called customer_number just add it in the url as  ?custumer_number={customer_number}
That will automatically create an input on your action.

Regards,
João Rosado
João Rosado wrote:
Hi Christopher,

If you need a url parameter called customer_number just add it in the url as  ?custumer_number={customer_number}
That will automatically create an input on your action.

Regards,
João Rosado
 Thank you Joao!  I will give this a try but to be clear you are saying that by adding the ?customer_number ={var_custno} to the end of the Jasper Report url call, Jasper knows to take the ?customer_number ={var_custno} and add it to the data adapter call Japser makes (in this case .../clientlistreportREST would become   .../clientlistreportREST?customer_number ={var_custno} )?  If so this is exactly what I am looking for!
Thanks again I really appreciate it!!!
Chris
 
Hi,

Yes, just try it and tell us if you got it working. :)
I get the following error message:

Error Message

This type of report output is not supported. The only supported types are: pdf, xls, xlsNoPag, csv, docx, rtf, odt, ods, xlsx, xlsxNoPag, pptx

This is the call... With password taken out:
http://104.197.68.11/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2Freports&reportUnit=%2Freports%2FAPAuditWithLicense&standAlone=true&j_acegi_security_check&j_username=jasperadmin&j_password=.......&decorate=no&output=pdf?LicenseId=1
Hi Cristopher,

On your second there is the ?LicenseId=1 should be &LicenseId=1, because the url already has a "?" previouslty.

Regards,
João Rosado
The paramater isnt being passed to the REST call...
The deatiled Log in Outsystems for the REST shows this:
The 'LicenseId' URL parameter is missing in the request.
   at ssSimplyFastPA2.CsRESTExpose.CsReportsREST.CsReportsRESTController.FlowReportsRESTActionUnpostedAPRESTAPIUsingLicense(Nullable`1 auxinParamLicenseId)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)

This is the JasperReport call:


http://104.197.68.11/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2Freports&reportUnit=%2Freports%2FAPAuditWithLicense&standAlone=true&j_acegi_security_check&j_username=jasperadmin&j_password=...&decorate=no&output=pdf&LicenseId=1
Oh, if it helps this is the rest call:
https://thelegacytrust-tst.outsystemsenterprise.com/SimplyFastPA2/rest/ReportsREST/UnpostedAPRESTAPIUsingLicense?LicenseId=1