Skip to Content
0

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

Nov 05, 2017 at 11:08 AM

164

avatar image
Former Member
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()


10 |10000 characters needed characters left characters exceeded
Former Member

waiting for help ....

0
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Don Williams
Nov 20, 2017 at 06:06 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Nov 07, 2017 at 09:42 PM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

thanks Don Williams , I try to change format the field with a font but did not succeed > what is the solution ?

0

What version of CR for VS are you using?

0
Former Member
Don Williams

Hi Don Williams , I use version CR for VS 13_0_5 _2

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

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()
Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Nov 09, 2017 at 08:43 PM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

thanks Don Williams , I'm Download and install (CRforVS_13_0_21) in Visual Studio 2012 but show error when run report:

An error occurred creating the form. See Exception.InnerException for details. The error is: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception >>> why ?

0
Former Member

I try again to install (Visual Studio 2017) and (CRforVS_13_0_21) but show same problem and not succeed ! why ? If the font problem is the right font to solve this problem (What is the name of the default font in Windows) ?

0

Did you remove the CR assemblies and add the 3500 version back in?

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

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

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

In VS if you preview the report does that work?

Or in CR Designer does it work?

As I said, design the report using the font, not set it in code to test.

Try MS Arial Unicode and see if that works.

Don

0
Former Member
Don Williams

hi Don Williams ,

I Try (MS Arial Unicode) but it did not work !

Is there a Font that numbers are like this (٠١٢٣٤٥٦٧٨۹) ?

0