Passing parameters via URL

I can access the report that I created using iireport. I use a url that allows me to look at my report from the JasperServer interface. It looks like this:

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin

My question is: can one pass parameters through this URL and when possible, how is this done? I have 3 variables in my SQL query in iReport, Startdatum, Enddatum and username.

+4
source share
1 answer

I just had to add input controls in the JasperServer interface, and then add these parameters.

before

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin

after

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fsamples%2FTest&reportUnit=%2Freports%2Fsamples%2FTest%2FEinReport&j_acegi_security_check&j_username=jasperadmin&j_password=jasperadmin&Startdatum=2014-04-08&Enddatum=2014-04-11&username=firstUser

URL.

&Startdatum=2014-04-08&Enddatum=2014-04-11&username=firstUser
+6

Source: https://habr.com/ru/post/1535746/


All Articles