Convert currency to Words(font Vietnamness)

Hi all,
I create report as crystal report tool .but I canu2019t convert currency number to vietnamness.
I can only convert to English.
URL=http://imageshack.usIMGhttp://img518.imageshack.us/img518/931/phieuchiqn6.png[/IMG][/url]
URL=http://g.imageshack.us/img518/phieuchiqn6.png/1/IMGhttp://img518.imageshack.us/img518/phieuchiqn6.png/1/w793.png[/IMG][/url]
I can not convert from number to word u2018s VietNamness.
I used create Customer Function in Crystal report for event this convert.But, it donu2019t work .
I create this function in VB.NET ,it work very good.
This is picture that I used in VB.NET.
URL=http://imageshack.usIMGhttp://img254.imageshack.us/img254/1227/convertdd6.png[/IMG][/url] URL=http://g.imageshack.us/img254/convertdd6.png/1/IMGhttp://img254.imageshack.us/img254/convertdd6.png/1/w363.png[/IMG][/url]
Now, I want to add this function into crystal report ,What do me do?
This is code :
Module Module2
Function ConvertCurrencyToEnglish(ByVal MyNumber As String)
Dim Temp
Dim Dollars, Cents As String
Dim DecimalPlace, Count As Integer
Dim Place(9) As String
Place(2) = " Nghìn "
Place(3) = "Triệu "
Place(4) = " Tỉ "
Place(5) = "Trăm tỉ "
' Convert MyNumber to a string, trimming extra spaces.
MyNumber = Trim(MyNumber)
' Find decimal place.
DecimalPlace = InStr(MyNumber, ".")
' If we find decimal place...
If DecimalPlace > 0 Then
' Convert cents
Temp = Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2)
Cents = ConvertTens(Temp)
' Strip off cents from remainder to convert.
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber ""
' Convert last 3 digits of MyNumber to English dollars.
Temp = ConvertHundreds(Right(MyNumber, 3))
If Temp "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
' Remove last 3 converted digits from MyNumber.
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
' Clean up dollars.
Select Case Dollars
Case ""
Dollars = "Không Đồng"
Case "One"
Dollars = "Một Đồng"
Case Else
Dollars = Dollars & " Đồng"
End Select
' Clean up cents.
Select Case Cents
Case ""
Cents = " Chẵn"
Case "One"
Cents = " Lẻ"
Case Else
Cents = " And " & Cents & " Cents"
End Select
ConvertCurrencyToEnglish = Dollars & Cents
End Function
Private Function ConvertHundreds(ByVal MyNumber)
Dim Result As String
' Exit if there is nothing to convert.
If Val(MyNumber) = 0 Then Exit Function
' Append leading zeros to number.
MyNumber = Right("000" & MyNumber, 3)
' Do we have a hundreds place digit to convert?
If Left(MyNumber, 1) "0" Then
Result = ConvertDigit(Left(MyNumber, 1)) & " Chăm "
End If
' Do we have a tens place digit to convert?
If Mid(MyNumber, 2, 1) "0" Then
Result = Result & ConvertTens(Mid(MyNumber, 2))
Else
' If not, then convert the ones place digit.
Result = Result & ConvertDigit(Mid(MyNumber, 3))
End If
ConvertHundreds = Trim(Result)
End Function
Private Function ConvertTens(ByVal MyTens)
Dim Result As String
' Is value between 10 and 19?
If Val(Left(MyTens, 1)) = 1 Then
Select Case Val(MyTens)
Case 10 : Result = "Mười"
Case 11 : Result = "Mười Một"
Case 12 : Result = "Mười Hai"
Case 13 : Result = "Mười Ba"
Case 14 : Result = "Mười Bốn"
Case 15 : Result = "Mười Năm"
Case 16 : Result = "Mười Sáu"
Case 17 : Result = "Mười Bảy"
Case 18 : Result = "Mười Tám"
Case 19 : Result = "Mười Chín"
Case Else
End Select
Else
' .. otherwise it's between 20 and 99.
Select Case Val(Left(MyTens, 1))
Case 2 : Result = "Hai Mươi "
Case 3 : Result = "Ba Mươi "
Case 4 : Result = "Bốn Mươi "
Case 5 : Result = "Năm Mươi "
Case 6 : Result = "Sáu Mươi "
Case 7 : Result = "Bảy Mươi "
Case 8 : Result = "Tám Mươi "
Case 9 : Result = "Chín Mươi "
Case Else
End Select
' Convert ones place digit.
Result = Result & ConvertDigit(Right(MyTens, 1))
End If
ConvertTens = Result
End Function
Private Function ConvertDigit(ByVal MyDigit As Object)
Select Case Val(MyDigit)
Case 1 : ConvertDigit = "Một"
Case 2 : ConvertDigit = "Hai"
Case 3 : ConvertDigit = "Ba"
Case 4 : ConvertDigit = "Bốn"
Case 5 : ConvertDigit = "Năm"
Case 6 : ConvertDigit = "Sáu"
Case 7 : ConvertDigit = "Bảy"
Case 8 : ConvertDigit = "Tám"
Case 9 : ConvertDigit = "Chín"
Case Else : ConvertDigit = ""
End Select
End Function
End Module
Thank you ,

Hi,
Hope this help, http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=103 .
You can search a topic User Function Libraries in Crystal Report for creating you own function
Regards,
Clint

Similar Messages

  • After converting PDF to word, font sometimes changes in the middle and I can't get the document all in the same font.  It happened on many documents.

    I am preparing a book which I want in Times New Roman. After converting from PDF files, many of the pages had other fonts, mainly Cambria in them and I couldn't get the whole document in the same font.  How can I fix this?
    ESharan

    Fix it in Word. Converting to Word from PDF is a complex and uncertain process, just the first stage in editing. But does the book only exist in PDF? Often people go through PDF because it seems easier, while often it is harder.

  • Currency in words

    Hi Experts,
    I want to know the function module to convert currency in words
    for example
    24.05 INR as 24 rupees 5 paisa
    others wise please tell me the tables in which currency data stored.....for example INR - Rupee , paise....
    Regards,
    Siva.

    Hi
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '123'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    AMOUNT = PAMOUNT
    CURRENCY = PWAERS
    FILLER = SPACE
    LANGUAGE = 'E'
    IMPORTING
    IN_WORDS = T_SPELL
    EXCEPTIONS
    NOT_FOUND = 1
    TOO_LARGE = 2
    OTHERS = 3.
    ENDFORM.
    Or
    DATA AMT_IN_NUM LIKE PC207-BETRG.
    DATA AMT_IN_WORDS(100) TYPE c.
    PARAMETERS: AMOUNT LIKE AMT_IN_NUM.
    CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
    EXPORTING
    amt_in_num = AMOUNT
    IMPORTING
    AMT_IN_WORDS = AMT_IN_WORDS
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE AMT_IN_WORDS.
    With Regards
    Nikunj Shah

  • Function module for converting the foreign currency to words

    hi,
    can anybody tell me about the function module for converting the foreign currency to words format.
    Like 25.50 USD
    should be "Twenty Five Dollar & Fifty Sents."
    foreign currency can be anyone like USD, JPY, EUR etc.
    Regards
    Nitin Varshney

    Hi,
    Try using the FM SPELL_AMOUNT
    Check this wiki
    [SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
    Regards
    Sarves

  • Convert numeric in words in adobe forms (start with the currency)

    Hi to all,
    Below script i found here for converting numeric into words and its work perfectly. Just I edit in UAE currency.
    It is possible to move the dirhams (currency) in front like. 1,900,000.55 = Dirhams One Million Nine Hundred Thousand and Fifty Five fils Only. (with period)
    or 1,900,085.55 = Dirhams One Million Nine Hundred Thousand Eight Five and Fifty Five fils.
    Previous code was One Million Nine Hundred Thousand Eighty-Five Dirhams and Fifty-Five Fils
    Thanks in advance
    Much Appreciate your advance help
    aTens = [ "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
    aOnes = [ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
      "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen",
      "Nineteen" ];
    function ConvertToHundreds(num)
       var cNum, nNum;
       var cWords = "";
       num %= 1000;
       if (num > 99) {
          /* Hundreds. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aOnes[nNum] + " Hundred";
          num %= 100;
          if (num > 0)
             cWords += " and "
       if (num > 19) {
          /* Tens. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aTens[nNum - 2];
          num %= 10;
          if (num > 0)
             cWords += "-";
       if (num > 0) {
          /* Ones and teens. */
          nNum = Math.floor(num);
          cWords += aOnes[nNum];
       return cWords;
    function ConvertToWords(num)
       var aUnits = [ "Thousand", "Million", "Billion", "Trillion", "Quadrillion" ];
       var cWords = (num >= 1 && num < 2) ;
       var nRight = Math.floor(num);
       for (var i = 0; nLeft > 0; i++) {
           if (nLeft % 1000 > 0) {
              if (i != 0)
                 cWords = ConvertToHundreds(nLeft) + " " + aUnits[i - 1] + " " + cWords;
              else
                 cWords = ConvertToHundreds(nLeft) + " " + cWords;
           nLeft = Math.floor(nLeft / 1000);
       num = Math.round(num * 100) % 100;
       if (num > 0)
          cWords += ConvertToHundreds(num) + " Fils";
       else
          cWords += "Zero Fils";
       return cWords;

    Hi RK,
    We had a similar requirement and we used Web Dynpro for Java which contained the Interactive Form that would display the personnel area, personnel sub area, etc.
    We developed a custom application in WD Java which would accept entries from the user on each screen after clicking on the Change Personnel area link in the portal. The user would put in the values and when the user would click on the Submit button, an adobe form would be displyed which would show the existing values as well as the values the user newly entered.
    Hope this helps. Do let me know if you need any further inputs.

  • Converting PDF to word using OCR

    How do I convert a PDF file to Word format without the text changing on the Word document?

    Hi IBEW45,
    OCR is enabled by default when you convert a PDF to Word via the ExportPDF website. Just make sure that you're selecting the correct language for character recognition.
    If you're converting to Word from within Reader, it is possible to disable OCR. If you're encountering issues where there are odd characters in the converted Word file, you may be running into font issues. A good troubleshooting technique is to disable OCR. Here are the instructions: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel.
    Please let us know how it goes.
    Best,
    Sara

  • Problems converting Pages to Word.doc

    I am new to Macs and Pages so need some help. I have to convert files to Word as some of the companies i work for need word docs. the problem i have found is some characters (in tables etc) and bullet points disappear, leaving an indent in word, but not the bullet point mark. This is very frustrating and have had to resort to opening text doc or pc office application and changing it all. what am i doing wrong?

    Hi macflower70
    Welcome to the forum.
    Word allows you to use dingbats from various standard Windows fonts, such as WingDings, as bullets.
    Pages does as well, but it may be that the particular font used in the Word document is not on your Mac or in a different format. OSX favors .otf files, many Windows users are still using the old non-Unicode .ttf files.
    When you open a file it may tell you that the font is missing and you may be given opportunity to open the font or replace it with another.
    Peter

  • Why does all alphabets change to capital when converting pdf to word using Adobe Acrobat XI

    Why does all alphabets change to capital when converting pdf to word using Adobe Acrobat XI

    Word 2013 uses its own pdf creator engine as far as I know. The step I performed were:
    1 - In the save settings I told word to embed fonts (sorry for the language, I have the Italian client)
    2 - Export from Word -> Save As -> .pdf adding also the table of contents/index
    N.B. I cannot use PDF/A, and in any case it doesn't embed the font
    A working solution is to use Acrobat XI to convert it or print with Adobe PDF printer, results:
    The problems are 2:
    1 - It doesn't create any bookmark and doesn't create links from the table of images to the linked images
    2 - Images, also with the preset "High Quality Printing" customized using "No compression", are really ugly and if you zoom a bit more than 100% they totally be s**t. It wasn't that way with PDF created by word.
    In the end, or I find they way to open the pdf created by word and embedd the missing font, or I find a way to make Acrobat XI creating bookmarks from the word file.
    Suggestion?

  • How can I change the size of a pdf source file, or, convert it to Word?

    How can I change the size of a pdf source file, or, convert it to Word?

    A lot depends on the form of the PDF. Is it graphics, a scan of a text file, pure text, or other? What version of Acrobat are you working with.
    You can do a save as to get a WORD file, but do not expect great results. The ability to get a decent WORD file depends on what the form of PDF you are working from. If it was created from WORD with tags and all, you might get good results. If not, you might get a lot of messed up results.
    Explain what you are starting with and your ultimate goal. Also check the audit of the file (should be under PDF Optimize) to see where the file information is concentrated (text, fonts, graphics, other).

  • Converting docx to pdf - font readability & quality

    I am using conversion software (such as Nitro PDF prof) to convert a 2010 word docx file into pdf - I use high quality (print ready) conversion for a larger file size. After the conversion, the pdf file opens properly in good quality within nitro pdf. However, when the same file is opened in acrobat rear 9./9.2, there appears to be a visible noticeable difference in quality. The font appears to be stretchy and it is NOT as sharp as the vie in nitro pdf. Even at 130% zoom, the document is not crisp.
    Is this a known problem? What is the best way to get around this?

    In the Preferences->Page Display Pane there are settings on how fonts are displayed on different monitors. Playing with these preferences might effect the display issues you are referring to

  • Convert Smartform to Word

    I have a requiremnt to convert a smartform output generated to Word format. Apart from the font sizes, i have a logo generated in smartform which also needs to be converted in that word. Can anyone know about this or have done this requirement then please reply back.
    Thanks & Regards,
    Pankaj Dwivedi

    Hi,
    <u>A example for you</u>
    CALL FUNCTION fm_name   " '/1BCDWB/SF00000031'
            EXPORTING
               control_parameters         = control_parameters
               output_options             = output_options
               s_header                   = st_header
               IMPORTING
               job_output_info            = output_data
               TABLES
                  it_overdue                 = ITAB[]
               EXCEPTIONS
                 formatting_error           = 1
                 internal_error             = 2
                 send_error                 = 3
                 user_canceled              = 4
                 OTHERS                     = 5
    now convert the final document (OTF format) into PDF
    format
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'DOC'
          IMPORTING
            bin_filesize          = v_pdf_len
          TABLES
            otf                   = output_data-otfdata
            lines                 = pdf_table
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            err_bad_otf           = 4
            OTHERS                = 5.
    Downloading the PDF file to the local Server
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME = L_FILENAME
            FILETYPE = C_BIN_FILETYPE
          TABLES
            DATA_TAB = lt_pdf_nuc_data
          EXCEPTIONS
           FILE_WRITE_ERROR = 1
           NO_BATCH         = 2
           GUI_REFUSE_FILETRANSFER = 3
           INVALID_TYPE = 4
           NO_AUTHORITY = 5
           UNKNOWN_ERROR = 6
           HEADER_NOT_ALLOWED = 7
           SEPARATOR_NOT_ALLOWED = 8
           FILESIZE_NOT_ALLOWED = 9
           HEADER_TOO_LONG = 10
           DP_ERROR_CREATE = 11
           DP_ERROR_SEND = 12
           DP_ERROR_WRITE = 13
           UNKNOWN_DP_ERROR = 14
           ACCESS_DENIED = 15
           DP_OUT_OF_MEMORY = 16
           DISK_FULL = 17
           DP_TIMEOUT = 18
           FILE_NOT_FOUND = 19
           DATAPROVIDER_EXCEPTION = 20
           CONTROL_FLUSH_ERROR = 21
           OTHERS = 22           .
        IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    Hope this helps you
    Regards
    Sudheer

  • I am in Hong Kong. How can I buy Export PDF (convert PDF to Word) ?

    I am in Hong Kong. How can I buy Export PDF (convert PDF to Word) ?

    you'll need to buy the present on the Japanese Apple Store if you want it shipped to her address. note however that you'll be charged in Yen (Japanese currency) and that your bank may apply additional charges. Contact your bank or search on their website for more details on paying in foreign currency.

  • Doc currency in words in PLD

    Hi Experts,
                     I want Document currency in words by clicking on sum in words USD and INR in PLD of Purchae order .when i set document total in words it gives doc total in INR only not in USD (Even BP currency is USD).so tell me solution ??
    Rgds
    Sudhir

    Hi,
    Step 1:Create one UDF for Convert amount to words ex: U_AmountInwords
    Step 2:Create Funtion below link i given funtion just Create in u r SQL DB.
    Step 3: Ceate Trigger in wich document you want ex:Invoice add trigger in OINV below i mention trigger just execute the trigger here we will call the funtion i.e.,Step 2 funtion.
    see this link below:
    [Re: Amount in words|Re: Amount in words]
    Regds,
    Sampath.

  • When converting files to word fr om MAC pdf - the HEADLINES and SUBHEADS - often look like this:  gOOd mOrNiNg wORlD, wAkE uP! what's wrong, what can I do?

    We make books, and our client just changed from PC production to MAC - and the headlines, subheads, and all big fonts go crazy  alternating or messing up  caps and lower case.
    What causes this - how can we fix it.  Thanks

    Hi J. Polmar,
    How were the original PDFs created? Are the headers and footers graphic elements? It sounds like there may be an issue with the Optical Character Recognition that ExportPDF is performing when you convert the PDF file to Word. You may have better luck by disabling OCR as outlined in this document: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel. Note, however, that when OCR is disabled, text that's part of an image in the original PDF won't be editable in the converted document.
    Please let us know how it goes.
    Best,
    Sara

  • Convert multiple files (word docs) to multiple pdf

    Hi,
    Is there a script I can use in batch processing to convert about 1500 word documents into pdf? I know it's possible to convert multiple files into one pdf, but this is no good to me. Doing these conversions one by one is going to take forever!
    I've tried selecting a few documents at a time and then selecting "convert to pdf" from the right-click menu, but each one requires that you tell it where to save, and then opens the file when it is done.
    I need to convert Word files on a regular basis for work, and could really use a batch process for this with so many to do!
    I have Acrobat 7 Pro (version 7.1.0) on XP Pro SP 2 at work, and Acrobat 8 Pro (Version 8.1.2) on XP Pro SP 3 at home.
    If there is anyway it's possible to do this via a batch process I would really appreciate knowing how!!
    Apologies if this has been covered in another thread, I searched but couldn't find anything.
    Thanks in advance :)

    I have Acrobat 9 Pro. I can batch convert Word docs to PDFs by doing this:
    1. Open Acrobat Pro. Click File > Create PDF > Batch Create Multiple Files...
    2. A window will open prompting you to add files. Click Add Files > Add Files... OR Add Folders... If adding a folder, navigate to it, and click OK to add it to the list. You can also select a bunch of files and drag & drop them into the Add Files window.
    3. Once you have all the files listed that you want to convert, click OK. A new window called Output Options will open. In this window, select your preferred settings. For me, I want all the new PDFs to have the same filename and be in the same folder as the Word docs, so I choose these settings:
    4. Click OK, and then the batch process will begin running. You will see Word opening and closing. However, you won't have to click Save or anything. You can run it unattended. The process takes a little while, so I usually set up a batch to run, then go to lunch. Once finished, you should have all your new PDFs:
    Hope that helps someone!

Maybe you are looking for

  • Multiple emails on one account.

    How can my daughter get into her FB and other accounts that uses her email address when I used my info to set up an account.  It tells us the email entered does not belong to any account.

  • I am on a mac with Leapoard 10.5.8. How do I install bootcamp?

    So... I have recently delved into recreational gameing, and have very quickly found out that there arent very many games compatible on the Mac software. Ive asked around a bit, and everyone suggests Apple Bootcamp. Ive taken a look around on the appl

  • Correct entry for /var/run/slapd.pid

    what is the correct pid for slapd? my os x did not come with slapd.pid so I'm trying to create one manually, but I don't know what I'm supposed to use. also any one know the correct entry for /var/run/slapd.args? Thanks, Tadashi

  • Credit/Debit Memo

    Hi, I have made Credit memo as well as Debit memo and payments for the same are made by clicking Make Payment Full Checkbox available in Actions button. After Moving in to General ledger by running Concurrent Payables Transfer to General Ledger we ar

  • Error updating from CS6 to CC CS6

    I get erros every time i update my CS6 via the creative cloud the error code it gives me is: U44M1P7 Can you explane what i need to do? My Lightroom 5 works fine after updating. regards Emile