Results 1 to 4 of 4

Thread: Parameter problems with ZuckerReports 1.8

  1. #1
    srazvigorov is offline Junior Member
    Join Date
    Feb 2007
    Posts
    4

    Default Parameter problems with ZuckerReports 1.8

    First of all I want to thank ZuckerReports authors for the great product.

    The problem I have is as following: I have designed (using iReport) several jasper reports which require direct input parameter. Reports are running fine in iReport and on JasperServer. When these same reports are run through ZuckerReports they fail to return correct data when the input parameter contains non latin characters (Cyrilic in may case). It does not matter whether the parameter is directly input through the keyboard or an sql query is used to obtain data from the database.
    Enabling "debug" option in ZuckerReports showed me that the parameter is correctly collected as Unicode and passed to JasperBatchMain class. At the same time the MySQL log shows that the sql server receives a query with smashed parameter (all characters interpreted as cp1252). In this case obviously the server does not return correct data. I am using SugarCRM 4.5.1e+ZuckerReports1.8+MySQL 5.0.27.

    Can anybody help to resolve the issue? I can see that ZuckerReports authors actively participate in these forums and hope they will give an advise.

  2. #2
    ftreml's Avatar
    ftreml is offline Sugar Community Member
    Join Date
    May 2005
    Location
    Vienna, Austria
    Posts
    399

    Default Re: Parameter problems with ZuckerReports 1.8

    Hi,
    can you please try to make the following patch and tell me if it helps (by PM or email to f.treml (at) go-mobile.at


    File: modules/ZuckerReportTemplate/ReportTemplate.php
    Line: 245
    Replace with:
    Code:
    fwrite($f, "parameter.".utf8_decode($name)."=".utf8_decode($value)."\n");

  3. #3
    kazkawamura is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default Re: Parameter problems with ZuckerReports 1.8

    Hi,

    I couldn't have a look at the source code of JasperBatchMain.
    But, zucker makes properties file. So, it might use java.util.Properties.
    Assuming zucker uses java.util.Properties, Properties.load only accepts iso-8859-1. If there are some characters which are out of iso-8859-1, java.util.Properties couldn't read them correctly. In this case, we need to unicode-escape these characters like \uxxxx.

    I guess it needs to native2ascii the prop file before calling java program.

  4. #4
    srazvigorov is offline Junior Member
    Join Date
    Feb 2007
    Posts
    4

    Default Re: Parameter problems with ZuckerReports 1.8

    Hi again,

    After additional debug I found out that:

    1. parameters directly input from ZuckerReports are collected correctly as utf8, but are later passed to the jdbc driver as if they are latin1 characters (they are in utf8).
    2. if you configure jdbc driver to use utf8 character set with MySQL server the driver converts the input parameters to utf8, but again from latin1 besides the parameters are actually in utf8.
    3. The above points are valid only for jrxml reports in Zucker. If you use directly input parameters for sql queries defined in Zucker everything is ok.

    It sounds like a problem in the java part of ZuckerReports but without the source I can not be sure.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MODULE: ZuckerReports 1.8 Beta
    By ftreml in forum Downloads
    Replies: 2
    Last Post: 2007-10-22, 03:24 PM
  2. ZuckerReports reporting problems
    By gremon in forum Help
    Replies: 2
    Last Post: 2006-08-30, 12:24 PM
  3. ZuckerReports Problems!
    By eosheroff in forum Downloads
    Replies: 1
    Last Post: 2006-06-28, 02:29 PM
  4. Multiple errors
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-11, 05:02 PM
  5. Errors when importing
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-09, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •