cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Former Member
0 Kudos

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

Answers (6)

Answers (6)

0 Kudos

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.

Former Member
0 Kudos

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?

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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?

0 Kudos

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