Skip to Content
0

Export a crystal report containing Arabic numbers to PDF problem

Feb 21 at 05:08 PM

115

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Don Williams
Feb 26 at 07:14 PM
0

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

Don

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Feb 21 at 05:13 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Don

Thank You for your interest, I'll Try this and I hope it works

Nady

0
nady nabil Feb 23 at 08:40 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
nady nabil Feb 24 at 08:51 AM
0

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?


Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Feb 23 at 09:29 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Is there a demo or a sample application that demonstrates how to export crystal reports, that contains Arabic data, to PDF

0