Jump to content
We've recently updated our Privacy Statement, available here ×

URL parameter output not working in JasperReports Server 4.1


tamdangp

Recommended Posts

Hello,

I am currently in the process of upgrading our version of JasperReports Server from 3.7 to 4.1. We use the direct URL method to access the reports. We have a lot of reports that need user input, and in 3.7 it would always prompt the user then render the report in the specified output method.

The URL is:

https://<JasperReports Server URL>/flow.html?_flowId=viewReportFlow&reportUnit=<report location>%20&standAlone=true&ParentFolderUri=<report location>&output=pdf

This used to work in 3.7, but after testing out our reports we're finding that specifying output=pdf doesn't prompt the user for input anymore, even though the input controls were set as "always prompt". This was working before in 3.7 but no longer works in 4.1. Is this a bug? Do we need to change an internal setting for this to work again? Not having this work is a show-stopper for us.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

 I should be a little more specific. Yes, our reports do render in PDF. The problem is that it doesn't prompt for user input before it outputs to PDF, so essentially the report is running with the default parameter values, even though the input controls were marked as "Always prompt" when the report is set up.

I suspected that the "output" parameter is the culprit because when we removed that, the report prompts for user input, but when we added it back in, it doesn't.

Thanks,

Tammy

Link to comment
Share on other sites

 I think you found a bug.  According to the JasperReports Server Ultimate Guide:

"If the report parameter values included in a report execution URL are not valid (for example, if a required parameter is missing or a parameter value is not valid), the user is prompted with the input controls so he can correct the values."

I tried this with a report that was set to always prompt and a mandatory input control, and it brings up a blank pdf as you are seeing.  In general, the HTTP APIs are used in environments where the control values are also passed, resulting in the correct output, but this looks like it does not match the documentation.

Go ahead and log it in the tracker.

Link to comment
Share on other sites

The fact that you are not getting the control with output=pdf is likely related to the defect identified here.

Assuming that you are using the default html output, I am not seeing any issue here.  What could be happening is one of two things:

1) Your input controls are set to "always prompt"

2) You have mandatory input controls that do not have default values or values being passed to them

I am guessing it is #1 since you point out that you have provided all of the parameter values.  If it is not #1, double check that the parameter names you are passing match those in the report. (not the label on the input control, but the actual control ID)

Link to comment
Share on other sites

  • 2 years later...

Hello:

We just finished upgrading Jasperserver to version 5.2 and the URL output parameter doesn't work.

If we add &output=pdf to the end of the url, the user gets a blank report. In Jasper Server 3.7 it works fine.

¿Is there any workaround?
 
Sorry about my english and thank you for all!!!

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...