Solved

Datareport rpttextbox

Posted on 2004-10-31
464 Views
Last Modified: 2013-12-26
hi,
how to change datareport rpttextbox dataformat form "#,##0 €" to "#,##0 $"
thanx
0
Question by:bilgiislemci
    2 Comments
     
    LVL 7

    Accepted Solution

    by:
    That is a result of you systems locale setting which could be modified to always to this.
    This function is out of my 'collective' library which will do the same thing w/o affecting all instances of it.


    Private Function FormatCurrency(ByVal numeric_string As _
        String, ByVal locale_id As Long, ByVal num_digits As _
        Integer, ByVal leading_zero As Boolean, ByVal _
        num_per_group As Integer, ByVal decimal_separator As _
        String, ByVal thousands_separator As String, ByVal _
        negative_order As Long, ByVal positive_order As Long, _
        ByVal currency_symbol As String) As String
    Dim fmt As CURRENCYFMT
    Dim buf As String * 200
    Dim buflen As Integer

        With fmt
            .NumDigits = num_digits
            If leading_zero Then
                .LeadingZero = 1
            Else
                .LeadingZero = 0
            End If
            .Grouping = num_per_group
            .lpDecimalSep = decimal_separator
            .lpThousandSep = thousands_separator
            .NegativeOrder = negative_order
            .PositiveOrder = positive_order
            .lpCurrencySymbol = currency_symbol
        End With

        If locale_id = 0 Then
            buflen = GetCurrencyFormat(locale_id, 0, _
                numeric_string, fmt, buf, Len(buf))
        Else
            buflen = GetCurrencyFormat(locale_id, 0, _
                numeric_string, ByVal 0&, buf, Len(buf))
        End If

        FormatCurrency = Left$(buf, buflen)
    End Function
    0
     
    LVL 18

    Expert Comment

    by:JR2003
    If you are getting the data from a database you can change the SQL to format the amount in the format you want.
    Which database are you using?
    JR
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: From Zero to Hero with Nodejs & MongoDB

    Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

    Suggested Solutions

    Title # Comments Views Activity
    Is an IP address in a Range 22 59
    DO Loop not working 4 46
    Opening Remote & Local Data Connection 2 28
    DIR issue 7 32
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now