web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SSRS > How to display numbers in an Arabic format?

(0) ShareShare
ReportReport
Posted on by 1,036

Hello awesome community!

I am trying to display numbers of the variables in my dataset in an Arabic format ( ١ ٢ ٣ ) .

I tried setting the property of the text box "Numeral Language" to "ar-SA" but nothing has changed.

What should I do to make them show in an Arabic format?

Any adivce would be appreciated 

Thanks in advance!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Blue Wang Profile Picture
    on at

    Hi Momochi,

    You can try to write code functions to convert digital formats.

    Please follow this:

    1.In Design view, right-click the design surface outside the border of the report and click Report Properties.

    2.Add code, like this:

             Public Shared Function Arabic(input As String) As String

                    Dim result As String = input

                    result = result.Replace(“1”, “?”)

                    result = result.Replace(“2”, “?”)

                    result = result.Replace(“3”, “?”)

                    result = result.Replace(“4”, “?”)

                    result = result.Replace(“5”, “?”)

                    result = result.Replace(“6”, “?”)

                    result = result.Replace(“7”, “?”)

                    result = result.Replace(“8”, “?”)

                    result = result.Replace(“9”, “?”)

                    result = result.Replace(“0”, “?”)

                    Return result

            End Function

    3.Go to Particular Field(text box) in report design and right click the text box,modify the Value property to use the following expression.

    79.PNG78.PNG

    4.After that,deploy report and build project,then you can see the changes in the Report at Front end.

    77.PNG

  • Momochi Profile Picture
    1,036 on at

    Thank you Blue Wang for the detailed answer!

    I followed your steps but when I deployed the report it gave me an error saying "Arabic is an invalid. InvalidIdentifier".

    I'm not sure why it's not working

  • Blue Wang Profile Picture
    on at

    Hi Momochi,

    Code.Arabic(Fields!SalesOrderInvoiceCount.Value)

    This "Arabic" is the function method name.

    Public Shared Function Arabic(input As String) As String.

    Is it convenient to upload screenshots?

  • Momochi Profile Picture
    1,036 on at

    Sure

    Here is the expression:

    Capture-22.PNG

    Here is the error output:

    774000.Capture.PNG

    Maybe custom code is not supported with AX?

  • Blue Wang Profile Picture
    on at

    Hi Momochi,

    Sorry,My fault.

    AX SSRS does not support VB code.

  • Momochi Profile Picture
    1,036 on at

    Oh, unfortunately...

    Anyway thank you for your time and help! :)

  • Blue Wang Profile Picture
    on at

    Hi Momochi,

    I overlooked that this is the AX Forum.

    You can use Data Methods.

    Please refer this: [View:https://community.dynamics.com/ax/b/axcasperkamals/posts/data-methods-in-ax-reports-and-ssrs-reports:750:50]

  • Momochi Profile Picture
    1,036 on at

    Hello Blue Wang,

    I followed the video tutorials and created a datamethod and used the code you typed previously.

    I used it on a simple text box that has a value of "123" , Here is the expression: DataMethod1("123") 

    But unfortunately when I run the report it displays as "???".

    It seems that the code does not recognize the Arabic numbers.

    Here is the method code:

    [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static string DataMethod1(string result)
    {
    result = result.Replace("1", "۱");

    result = result.Replace("2", "۲");

    result = result.Replace("3", "۳");

    result = result.Replace("4", "٤");

    result = result.Replace("5", "۵");

    result = result.Replace("6", "٦");

    result = result.Replace("7", "۷");

    result = result.Replace("8", "۸");

    result = result.Replace("9", "۹");

    result = result.Replace("0", "۰");
    return result;
    }

  • Blue Wang Profile Picture
    on at

    Hi Momochi,

    The format you use is C# code,So you can't put the code in directly.

    If you want to use it in VB, you should use:

             <DataMethod(), PermissionSet(SecurityAction.Assert, Name:="FullTrust")>

             Public Shared Function GetCustomerData() As System.String

             End Function

    [View:https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/how-to-define-a-data-method-in-csharp:750:50]

    [View:https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/how-to-define-a-data-method-in-visual-basic:750:50]

  • Blue Wang Profile Picture
    on at

    Hi Momochi,

    I've looked at your problem description again.

    You only mentioned that you changed the NumeralLanguage property, and whether you changed the NumeralVariant property.

    80.PNG
    The report needs to be redeployed after the change, otherwise it will not work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans