ejhellerattc Posted June 30, 2020 Share Posted June 30, 2020 I have a report that was written several years ago with JasperStudio. It has a couple of parameters that are passed to it. The first is a value for the WHERE clause of the SQL. The second is the SQL statement itself. The queryString is defined by the parameter: <queryString> <![CDATA[$P!{SQL_QUERY}]]> </queryString>The SQL_QUERY parameter is of a form: <parameter name="SQL_QUERY" class="java.lang.String" evaluationTime="Early"> <defaultValueExpression><![CDATA["select <SQL stuff ....> where determination_value = $P{Device}"]]></defaultValueExpression> </parameter>The Device parameter is defined as a simple java.lang.String data type.This report ran fine in JasperStudio where it was developed and does run fine as part of our application using the embedded methods. However, I switched to using the Eclipse add-in to use JDK 11. With the Eclipse IDE, running the report causes SQL Server to generate and error:Caused by" com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'parameter_Device'.My supposition is that the Jasper Add-In is expanding the parameter, but not replacing the parameter with the value of the parameter prior to issuing the SQL statement.I could not find anything similar in the knowledge base. Has this been reported by anyone or addressed in a newer version? Thanks,Edward. 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