Skip to Content
avatar image
Former Member

CrystalReport can't find datasources of ODBC Textdriver when using path with chinese characters

Hello,

since our program now supports the UTF8 characterset it is also possible to use e.G. chinese characters as path names.

This leads to problems when trying to show reports. We use ODBC textdriver as datasource for our reports and have not problems with.

It works perfectly with an path like D:\something\#34958.

But the files can't be read when using chinese characters and an error "This Fieldname is not unknown" appears.

Is there a way to fix this behaviour or are paths with such characters not supported by ODBC or the Crystal Reports runtime engine for .Net?

I use the newest version 13.0.20.2399.

Any help or hint is very much appreciated. :)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    Jul 17, 2017 at 04:13 PM

    Hi Thomas,

    OK, looking at the error closer it appears there is a problem in your formula - This fieldname is unknown.

    This could be a problem with ODBC itself, I don't have the report so not sure if it's CR or ODBC having the issue translating the text.

    I create a folder with Chinese (simplified) and moved an MDB file into it and it works for me so it;s not the Chinese characters causing the problem but the data within or how ODBC is converting that data.

    Try downloading ODBCTest from Microsoft and test using it and see what happens.

    Try querying for the field that is generating the error.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the answer, Don. :)

      The Report I tested it with is very basic, I only added 2 fields to the report, so there are no formulas which can destroy anything and the ehaviour is still the same.

      I guess the ODBC test from Microsoft is only for querying with SQL commands, which seem to not be possible with ODBC textdriver without bigger changes...

      I can send you the project if you like but it seems it is not possible in the QA system...

      But it would totally sufficent for me if you tell me, that it is not possible to use this kind of paths with ODBC textdriver and Crystal Report, so I can report to my team mates. :)

      Thanks in advance. :)

      elpgmccheck.txt schema.txt

      elpgmccheck.txt (2.0 kB)
      schema.txt (112.4 kB)
      reportfields.png (21.6 kB)
  • Jul 05, 2017 at 10:25 PM

    Try setting the Viewer local before opening the report and see if that works:

    Array valArray = Enum.GetValues(typeof(CrystalDecisions.ReportAppServer.CommonControls.CeLocale));
    foreach (object obj in valArray)
    {
    lstCeLocale.Items.Add(obj);
    }

    For viewing set the locale first also:

    // this gets the locale when set before the report was opened and sets the viewer to the same language
    if (chkSameAsCELocale.Checked)
    {
    int x = (int)rpt.ReportClientDocument.LocaleID;
    crystalReportViewer1.SetProductLocale(x);
    }

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 14, 2017 at 06:20 AM

    Hello Don,

    thanks for your answer, but I tried your suggestion and it did not help.

    I think it is something else.

    For testing I created a minimal report with only one text file over ODBC textdriver as datasource. It does not have any chinese characters IN the report file.

    It works perfectly fine when the path in the ODBC driver is set e.G. "D:\SomeFolder\Projects\#25225 ab":

    But when the path in the odbc driver is

    the fields are empty:

    Are these paths not supported in CrystalReports?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 19, 2017 at 07:26 AM

    Thanks for the answer, Don. :)

    The Report I tested it with is very basic, I only added 2 fields to the report, so there are no formulas which can destroy anything and the ehaviour is still the same.

    I guess the ODBC test from Microsoft is only for querying with SQL commands, which seem to not be possible with ODBC textdriver without bigger changes...

    I can send you the project if you like but it seems it is not possible in the QA system...

    But it would totally sufficent for me if you tell me, that it is not possible to use this kind of paths with ODBC textdriver and Crystal Report, so I can report to my team mates. :)

    Thanks in advance.

    elpgmccheck.txt

    schema.txt

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 26, 2017 at 01:00 PM

    Hi Thomas,

    Next test is to try it in CR Designer and see if it works there. If it does not work in CRD then it will not work in the SDK.

    The CR Designer embedded in VS is CR basic and is limited to what it can do and support.

    Does the report work when you run the app? Does it work when you preview in the embedded Designer?

    You can get a trial version of CRD from here:

    https://www.sap.com/products/crystal-reports.html

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2017 at 06:15 AM

    Thanks Don, there it is also not possible, so I guess it is not supported at all.

    Do you have any infos, if this is a general problem of Crystal Reports or if this should be possible with a different type of datasource?

    Might this be fixed in the nearer future?

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23 at 04:19 PM

    As I noted it works for me so it must be your environment or MS ODBC driver.

    CR will use ODBC to connect to the text file so it's not a CR issue.

    Add comment
    10|10000 characters needed characters exceeded