开发者

Jasper Report arabic query problem

开发者 https://www.devze.com 2023-03-02 17:34 出处:网络
I\'m trying to make a report in jasper the report query contains this where statement where payment=\'شيك\'

I'm trying to make a report in jasper the report query contains this where statement

where payment='شيك'

when I try to run the report using the JRViewer300 I got the following exception

net.sf.jasperreports.engine.fill.JRExpresssionEvalException : Error evaluating expression...

When I change the where statement to

where payment='cheque'
开发者_Go百科

the report runs without any problem. So what is all this about?

Thanks


I assume that the database is set to work with UNICODE encoding, In Java you need to escape the input string (treat special chars) and turn the encoding to UTF-8 ( or 16) Check this out.

...and also try this:

exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8");

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号