Skip to Content

Export a crystal report containing Arabic numbers to PDF problem

I am using visual c# 2010 and sap crystal reports and MS Access to build a Windows Desktop application; my report reads data from the database then displays and prints the data in Arabic correctly after I configured Windows 7 to display numbers and dates in Arabic, but the problem is when I export the report to PDF all numbers appear in English

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Feb 26 at 07:14 PM

    Use Google and search for .NET UFL and you'll find a KBA article on how to write one.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 21 at 05:13 PM

    Hi Nady,

    It can be a few things causing this...

    You can set the Locale for the Report and viewer this way:

    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);
    }
    }

    When Viewing then set the locale also, I used a drop down list box but you can try hard coding the value.

    // 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;
    crystalReportViewer2.SetProductLocale(x);
    }

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 23 at 08:40 PM

    Hi Don

    I tried your answer but unfortunately it did not solve my problem, I set the locale to ceLocaleArabicEgypt but nothing happened the numbers still appeared in English in the PDF file and also in the application if I do not change Windows 7 Settings to display numbers in Arabic.

    If I change the locale to any other language such as Hindi for Example only month names change as a result, but numbers remain in English.

    This looks like numbers are not affected by the CeLocale Property.

    Any Help or Opinions or Guidelines will be Appreciated.

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 24 at 08:51 AM

    For the fields that contain numbers I set the font to 16 Arial bold,and reading order to RTL, and for the field that contains date (it reads the dates to display from an MS Access database) I changed the formatting to show short dates only.

    Is there a demo or a sample application that demonstrates how to export crystal reports that contain arabic numbers to PDF?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 23 at 09:29 PM

    OK, how did you format the number field? Are there any custom feature used?

    Add comment
    10|10000 characters needed characters exceeded