• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Visual Studio Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Download
 
 
Support
 
 
Community
 
 
Forums
 
 
 
Visual Studio Developer Center > Visual Studio Forums > Crystal Reports for Visual Studio > See arabic number while export from crystal report to pdf
Ask a questionAsk a question
Search Forums:
  • Search Crystal Reports for Visual Studio Forum Search Crystal Reports for Visual Studio Forum
  • Search All Visual Studio Forums Search All Visual Studio Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerSee arabic number while export from crystal report to pdf

  • Tuesday, July 15, 2008 1:16 PMAhmedkiwi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Hi all,

    This is the question that no body answer it in the internet

    I build application in visual studio 2005 and i created a report in crystal report that integrated with the VS2005

     i see the number in arabic in the web and also i see the number in arabic in the preview of the crystal report

    but when i export the report to pdf , the number changed to english

    i don't know why and no body know ho to do that in the internet
    from three weeks i tried to solve this problem but without any advance

    I hope any advanced programmer here can tell me the answer

    thanks
    • ReplyReply
    • QuoteQuote
     

Answers

  • Sunday, July 20, 2008 11:45 AMAhmedkiwi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0
     Ok

    I found the solution

    I think im the first one who post the solution for this problem
    I search before in all english and arabic threads but without a good solution
    Some one tell me that you have to change the language setting from control panel...... but this not a good solution and not the solution at all

    Some one tell me that you have to change the version for crystal report.... but this not the solution also

    the solution is:

    We have to build a function that change the character before we export the crystal report to pdf
    and also first we have to know the character code of the arabic number, which are:

    "0", (&#1632)

    "1", (&#1633)

    "2", (&#1634)

    "3", (&#1635)

    "4", (&#1636)

    "5", (&#1637)

    "6", (&#1638)

    "7", (&#1639)

    "8", (&#1640)

    "9", (&#1641)

    so now we can change the Text in the text box control by this statement:

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("0", ChrW(1632))

    and the complete function that i build for this problem is named  ChangeToArabicNumber()
    i make it public for the pages who have a master page, so the complete code is:

    Private Sub ChangeToArabicNumber()

    'Eng.Ahmed Rashid Al-Farhan

     

    Dim ArNumTextBox As TextBox

    For Each ctlMaster As Control In Page.Controls

    If TypeOf ctlMaster Is MasterPage Then

     

    For Each ctlForm As Control In ctlMaster.Controls

    If TypeOf ctlForm Is HtmlForm Then

     

    For Each ctlContent As Control In ctlForm.Controls

    If TypeOf ctlContent Is ContentPlaceHolder Then

     

    For Each ctlChild As Control In ctlContent.Controls

    If TypeOf (ctlChild) Is TextBox Then

     

    ArNumTextBox = ctlChild

    ' Case "0"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("0", ChrW(1632))

    ' Case "1"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("1", ChrW(1633))

    ' Case "2"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("2", ChrW(1634))

    ' Case "3"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("3", ChrW(1635))

    ' Case "4"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("4", ChrW(1636))

    ' Case "5"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("5", ChrW(1637))

    ' Case "6"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("6", ChrW(1638))

    ' Case "7"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("7", ChrW(1639))

    ' Case "8"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("8", ChrW(1640))

    ' Case "9"

     

    ArNumTextBox.Text = ArNumTextBox.Text.Replace("9", ChrW(1641))

    End If

     

    Next

     

    End If

     

    Next

     

    End If

     

    Next

     

    End If

     

    Next

     

    End Sub

    So know every one can get the report in pdf with arabic number
    thanks to all and best regards

    • Marked As Answer byAhmedkiwi Sunday, July 20, 2008 12:22 PM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

    Need Help with Forums? (FAQ)
     
    © 2009 Microsoft Corporation. All rights reserved.
    Terms of Use
    |
    Trademarks
    |
    Privacy Statement