2005 IR Help Posted September 1, 2006 Share Posted September 1, 2006 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 More sharing options...
aantista Posted November 2, 2007 Share Posted November 2, 2007 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 More sharing options...
GrayChan Posted March 8, 2008 Share Posted March 8, 2008 I have same issue , could you give me more details ? Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted March 9, 2008 Share Posted March 9, 2008 The bean shell evaluator is used only by iReport in order to generate a query to execute and discover the fields for the report. You can workaround the error just setting a default value expression for each parameter used in your query. Regards Giulio Link to comment Share on other sites More sharing options...
lschmidt Posted December 10, 2008 Share Posted December 10, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now