dboutin Posted November 27, 2009 Share Posted November 27, 2009 Hi,In JasperServer pro 3.5, I've made a specific function named "ifFieldEquasValue"------ extract of applicationContext-semanticLayer.xml file -------------------------------<entry key="ifFieldEqualsValue"><value>"IF(" + sqlArgs[0] + " == " + sqlArgs[1] + "," + sqlArgs[2] + "," + sqlArgs[3] + ")"</value></entry>---------------------------------------------------------------------------------------------------------The problem is when I'm using this formula inside the calculated fields tab of domain designer and sqlArgs[1] contains french accents, the following error arrise :<<The expression was only partially recognized['Donnéeste] recognized part['Donnéestec] original string.>>Is there something specific to configurate on JasperServer 3.5 to have a correct behaviour with french accents ?Regards,Denis. Link to comment Share on other sites More sharing options...
gautier Posted November 27, 2009 Share Posted November 27, 2009 What is the character set of your database ? Maybie you should specify it in the connection string of your JDBC datasrouce Link to comment Share on other sites More sharing options...
dboutin Posted November 27, 2009 Author Share Posted November 27, 2009 the charset of database is "latin1". The accents are normally well rendered in a specific application using the same datasource information that I use inside JasperServer. driver : com.mysql.jdbc.Driverurl : jdbc:mysql://10.225.7.25:3307/repository_IDIlogin : rootpassword : ***** I'm going to try with the same jdbc driver that I use in my specific application Link to comment Share on other sites More sharing options...
dboutin Posted November 27, 2009 Author Share Posted November 27, 2009 The fact of using the same jdbc driver as the one in my custom app doesn't change the problem Link to comment Share on other sites More sharing options...
sjongenelen Posted November 30, 2009 Share Posted November 30, 2009 did you update your mysql jdbc driver to the latest version (5.1 i believe) Link to comment Share on other sites More sharing options...
dboutin Posted November 30, 2009 Author Share Posted November 30, 2009 yes I try to do that. It doesn't resolve the problem. Link to comment Share on other sites More sharing options...
gautier Posted December 8, 2009 Share Posted December 8, 2009 Hi I can recommand you to use JNDI connexion as they close unused session better and then specify the character setIn META-INF directory edit context.xml Qdd the folowing ressource : <Resource name="jdbc/yourbase" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="youruser" password="yourpassword" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/yourbase?useUnicode=true&characterEncoding=Latin-1"/>On the jasperserver repository create a JNDI with jdbc/yourbase as a referenceHope this helps,GuillaumePost Edited by gautier at 12/08/2009 09:53 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