Parameter Passing in URL!

0

Hi!

I put the following url in the address bar

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/samples/AnnDetail&standAlone=flase&ParentFolderUri=/reports&j_username=jasperadmin&j_password=jasperadmin

and go to the page where JasperServer asks me to input the values of parameters. I enter the values and my report is displayed with this url

http://localhost:8080/jasperserver/flow.html

Is there any way that I can embedd the values of the parameters in the url and instead of parameters page, the jasperServer takes me directly to the report? While doing this, one thing should be in consideration that the parameters are of date type and the report will only accept date type values.

The thing I want to do is that in my own application's page, I'll enter the parameters and submit. At this submit, the first url will go. How to add parameters to that url?

Thanks & Best Regards.

AsadUllah.

Please help.

hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 10 years 2 months ago

5 Answers:

0

Issue Solved!

hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 10 years 2 months ago
0
please provide the sollution ?
sjongenelen's picture
Joined: Nov 9 2009 - 1:05am
Last seen: 10 years 1 month ago
0
Its very easy. In JasperServer, create input controls with the names exactly as are the report parameters. And then add the parameter and their values in the url just as user name and password.
For example, for a Parameter in the Jasper Report with the name PAR_USER, the url will be like...

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/samples/AnnDetail&standAlone=flase&ParentFolderUri=/reports&j_username=jasperadmin&j_password=jasperadmin&PAR_USER=Value

Now use this url and you'll be directly taken to the report. No authentication, no dialog box asking for parameters.

Hope I made clear. Please ask if any confusion.
hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 10 years 2 months ago
0
One more thing. I replaced my Date type parameters of report with String type parameters and in my JasperReport query, I used TO_DATE. e.g. in the where clause of the query, it was like
Booking_Date >= $P{PAR_BOOKING_DATE} --This parameter is of Date type.
I did it this way
Booking_Date >= to_date($P{PAR_BOOKING_DATE},'dd/MM/yyyy') --Now this parameter is of String type.
hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 10 years 2 months ago
1

This is an old thread, but I figured I'd post something I learned here just in case anyone is having a similar problem. My report uses a parameter that, for prompting purposes, I defined as a drop-down list. It essentially is a string value that gets assigned by the drop-down to the parameter. It works fine when prompted in JasperServer. If I tried to pass that parameter in a URL, it always used the default value.

The problem was that the Parameter Name in the report has to be exactly that same as the Parameter Name in the control. Jasper tells you that in the gray helper text on the Edit Input Control pane, but it's worth double-checking it. Sometimes it's the simplest solution that works!

prlebeau's picture
Joined: Jul 18 2007 - 8:31pm
Last seen: 2 years 10 months ago
Feedback
randomness