Skip to Content
avatar image
Former Member

how to make number to national digits Arabic in runtime use Crystal Reports 2012 ?

I'm use VS2012 and after run to CrystalReport show number (0123456789) ,

I want the numbers as follows (٠١٢٣٤٥٦٧٨۹) after runtime

I'm use code to run CrystalReport :

Dim dt As New DataTable  
With dt  
.Columns.Add("ID")  
End With  
For Each dr As DataGridViewRow In Me.CalculationTableDataGridView.Rows  dt.Rows.Add(dr.Cells("ID").Value)  
Next
Dim rptdoc As CrystalDecisions.CrystalReports.Engine.ReportDocument  rptdoc = New CrystalReportCount  
rptdoc.SetDataSource(dt)  
CRCountTotal.CrystalReportViewer1.ReportSource = rptdoc  
CRCountTotal.ShowDialog()  
CRCountTotal.Dispose()


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Nov 20, 2017 at 06:06 PM

    So I pasted the text into a CR Text object and it shows fine.

    The issue appears to be the Database driver you are using may be interpreting the wrong font.

    Oracle for example has a Language property to set locale, others may have also.

    Your code appears to be using the Dataset or XML data source so you need to look there for a solution.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07, 2017 at 09:42 PM

    You need to format the field with a font that supports those characters.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 10, 2017 at 06:54 PM

    I try one more then for code but not succeed :

    Dim renderCulture AsCultureInfo = CultureInfo.CreateSpecificCulture("ar-IQ")
    renderCulture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational
    Thread.CurrentThread.CurrentCulture = renderCulture
    Dim rptdoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
    rptdoc = NewCrystalReportCount
    rptdoc.SetDataSource(dt)
    CRCountTotal.CrystalReportViewer1.SetProductLocale("ar-IQ")
    Dim testLocale As CrystalDecisions.ReportAppServer.DataDefModel.CeLocale = CeLocale.ceLocaleArabicIraq
    rptdoc.ReportClientDocument.LocaleID = testLocale
    rptdoc.ReportClientDocument.PreferredViewingLocaleID = testLocale
    rptdoc.ReportClientDocument.ProductLocaleID = testLocale
    CRCountTotal.CrystalReportViewer1.ReportSource = rptdoc
    CRCountTotal.ShowDialog()
    CRCountTotal.Dispose()
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 09, 2017 at 08:43 PM

    Download SP 21, you are using SP 5, and try again:

    https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    Read the info on the WIKI, lots of info you need to know when updating your app.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2017 at 07:30 AM

    What is the appropriate font for the appearance of the figure as required is (٠١٢٣٤٥٦٧٨۹) ?

    Add comment
    10|10000 characters needed characters exceeded