4

I am able to access a report, that I created with ireport. I am using an url which let's me have a look at my report from the JasperServer interface. It looks like following:

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 it is possible, how is it done? I have 3 variables in my SQL query in iReport called, Startdatum, Enddatum and username.

BoJack Horseman
  • 4,406
  • 13
  • 38
  • 70

1 Answers1

7

I just had to add input controls in the JasperServer interface and then add those 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

Basically just adding input controls and these parameters to the url.

&Startdatum=2014-04-08&Enddatum=2014-04-11&username=firstUser
BoJack Horseman
  • 4,406
  • 13
  • 38
  • 70
  • But this would only be valid for a specific locale, right? For instance, if you use "de_CH", this dates could not be transformed into dates by the JasperReports engine. Am I right? – frandevel Jul 03 '14 at 08:57
  • 1
    I tried this but adding input controls takes me to input control screen filed with values passed in url. Is there a way i can directly navigate to report result screen(bypassing the input controls screen) – emilly Jan 24 '15 at 16:31