0
votes

I call a jasper report through an independent URL through which I pass one of the input controls needed to run the report.

E.g. http:// localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&reportUnit=xyz&ParentFolderUri=abcd&j_username=xyz&j_password=xyz&parameter1=value1& . . .

As you can see in the above independent URL, I pass the JasperServer username and password, reportUnit name and location and other mandatory parameters, along with the report input parameter, i.e., "parameter1" which can have a value like "value1".

I used a mandatory, read-only and visible input control for this input value. Its value would come from the independent URL, showed in the box but was read-only and hence could not be changed.

The report was working absolutely fine upto this point.

But the tragedy began when my client rejected this idea. He wanted a completely invisible input control to my report and the input value would be passed through the independent URL, just like illustrated above.

And then my client asked me to refer to this and made me work on cascading input controls.

Recently I added a cascading input control to this report. The input control type is a single select query, which utilizes two parameters that I pass to the report through the independent URL.

Now when the Jasper server responds to the independent URL with the input parameters, all the other static parameters work properly, except for the cascaded one.

When I click the select box of the cascaded input, I can see the desired options for a second, and then, it just goes empty while I'm viewing the select list.

But when I make the "Parameter1" input control visible, the cascading input control works!

And then I turn in invisible, the cascading input control turns into a beast that does things by itself and not listen to his master.

I am not able to understand why this is happening. Could anybody please provide me a solution to this?

1
Can you post the query you use to populate your cascading input control, and the ID's of any input controls that are used to constrain that query? (Sorry, I don't have enough reputation points to add this as a comment to your original question. However, I do have working cascading input controls in my own reports, so maybe I can help.)Lisa
Are you using ireports to do the operation or doing it on the server side itself??Also provide some details regarding the query as only then others can help where you are wrong.Another suggestion would be to check the LOGS on the server,they log the query so you can exactly see what parameters are passed and in what way.(Sometimes quotes or commas can cause problems).Hope that helps.KillABug
Please post the query that you use to populate your cascading input control.Lisa
Sorry Lisa, I cannot provide you that much detail due to confidentiality constraints.Rachcha
And moreover, the problem is not with the query. When the input control for "parameter1" is visible, the cascading input control works fine. There is no problem then. The problem comes when the "parameter1" input control is made invisible.Rachcha

1 Answers

0
votes

I have found a temporary solution for this.

I made the "Parameter1" input control visible and read only.

Next, I used a stylesheet and defined a style rule that would affect that input control's display on the web page, making "display: none".

I passed the name of the stylesheet through the URL. So this stylesheet is used for the report.

Now, the "Parameter1" input control is invisible to the end user and my report still runs with no one knowing it's just a fix.