none
How to format numeric strings with locale settings in RDLC custom code RRS feed

  • Question

  • I have a textbox that displays an hyperlink of a numeric string. The hyperlink was implemented using HTML tags in the textbox properties. It looks like the Language property of the textbox does not change the format of my numeric string because of the HTML tag. So I'm thinking of changing the numeric format thru custom code. However, RDLC seems does not know CultureInfo.

    Any idea on formatting numeric string in RDLC custom code?

    Thank you


    • Edited by charyngo Monday, January 27, 2014 2:08 AM typographical error
    Monday, January 27, 2014 2:07 AM

Answers

  • Got the right syntax!

    Public Function FormatNumericString(ByVal value as Single, ByVal language as String) as String
    
      Dim ci as New System.Globalization.CultureInfo(language)
    
      return value.ToString("n3",ci)
    
    End Function


    • Marked as answer by charyngo Monday, January 27, 2014 4:22 AM
    • Edited by charyngo Monday, January 27, 2014 4:22 AM
    Monday, January 27, 2014 4:21 AM