cancel
Showing results for 
Search instead for 
Did you mean: 

Korean language in text object

0 Kudos

Hello everyone.

Im using SAP Crystal Reports 13.0.22 for Visual Studio and experience an issue related to displaying text written in Korean language in text object.

I have tested by creating an empty text object and tried to cut and paste text written in Korean language from document to text object, but text object displayed only some characters instead of actual text.

Please advise

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

That's a tough one....

If you don't know or can't detect what language the data is in then CR won't be able to either.

You can get the CodePage like this, although it only changes the CR menu language:

private void lstCeLocale_SelectedIndexChanged(object sender, EventArgs e)
{
    //this is the routine to set the default language locale for the report. Must be done before the report is loaded.
    CrystalDecisions.ReportAppServer.CommonControls.CeLocale myceLocale = (CrystalDecisions.ReportAppServer.CommonControls.CeLocale)lstCeLocale.SelectedItem;


    try
    {
        rpt.ReportClientDocument.LocaleID = (CrystalDecisions.ReportAppServer.DataDefModel.CeLocale)myceLocale;
    }
    catch (Exception ex)
    {
        MessageBox.Show("ERROR: " + ex.Message);
    }


Then when viewing set the viewer to the same:

// 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);
    btnSQLStatement.Text += x.ToString();
}

The problem is some DB Clients will convert the text to the Locale. The issue is CR doesn't do language conversion, it's based on the Client and font selected when designing the report.

If you can figure out how to detect the language used then you can scan all objects and change the font to something that shows the proper characters.

There are API's to change the font in CR SDK.

My parameter test app has a routine to get the fonts used in the report:

how-to-parameters-in-crystal-reports-for-visual-studio-net

So you need to figure out what Language is being used and set the font to a Unicode UTF-8 font for that user.

We used to tell people to use MS Ariel Unicode that came with Office but not sure if it is any more or free to distribute.

You'll have to find one that works for all users and select/set it for all objects in the report.

Or see if your DB Client has default language config option.

Don

0 Kudos

Greatly appreciate your response, helpful article.

Thanks

Answers (1)

Answers (1)

0 Kudos

The problem with copy/paste is it uses the font glyph from the source which isn't or may not be available in CR.

Copy the text into Notepad, paste it into CR and change the font that supports the text.

A Unicode UTF-8 encoded font is required.

Don

0 Kudos

Greatly appreciate your quick response.

It is a good starting point but not sure if it will solve our issue.

We are building report for thousands of people based on database source and we never knew in which language information will come. Any suggestions on how to create Text Object which will dynamically identify language in which text was written and based on that apply desired font.

Thanks Alex.