Jump to content
Changes to the Jaspersoft community edition download ×

Nested Parameters Give Error


2005 IR Help

Recommended Posts

By: Sharlene - sharly

Nested Parameters Give Error

2005-03-07 11:16

My report contains two parameters. The first has a default string value, and the second is an SQL query that references the first parameter: "where branch_cd = " + $P{b_cd}. I pass the latter as the query string to the Report Query Dialogue as $P!{Query}. I then see an error message stating "Inline evaluation of bshCalculator.evaluate(#):null". When I programatically compile the associated xml document with jasperreports API, I am able to see the results without incident.

Is this a known bug? Or am I doing something wrong?

 

Sharly

Link to comment
Share on other sites

  • 1 year later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I also had a similar issue and after trying many possibilities may have found the solution. When you create the 2nd parameter try this...

 

" where branch_cd = '$P!{b_cd}' "

 

Also, remember to put this syntax in the where clause of the SQL statement: P$!{<Parameter_name>}, where P${<Parameter_name>} is the 2nd parameter and equals " where branch_cd = '$P!{b_cd}' ".

 

Hope this helps someone.

Link to comment
Share on other sites

  • 4 months later...
  • 9 months later...

I am still having issues.  My 2nd parameter uses the 1st parameter in a query/stored procedure.  Parameter 1 is also based on a query, and has a default value of " ". 

CALL proc_a($P{parameter1})

I keep getting the similar error to everyone else - "Error preparing statement for executing the report query".  How can I use the 1st parameter selection to determine the 2nd parameters value?

Thanks!

 

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...