Jump to content
We've recently updated our Privacy Statement, available here ×

Error using accents char inside a formula field


dboutin

Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

url : jdbc:mysql://10.225.7.25:3307/repository_IDI

login : root

password : *****

 

I'm going to try with the same jdbc driver that I use in my specific application

Link to comment
Share on other sites

Hi

 

I can recommand you to use JNDI connexion as they close unused session better and then specify the character set

In 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 reference

Hope this helps,

Guillaume



Post Edited by gautier at 12/08/2009 09:53
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...