Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 211329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:05:08+00:00 2026-05-11T18:05:08+00:00

I m working on windows form application. I need to show amount in words

  • 0

I m working on windows form application. I need to show amount in words in crystal report.
How can show amount in words in crystal report ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:05:08+00:00Added an answer on May 11, 2026 at 6:05 pm

    You can write custom property in the class object (if you are binding it to object datasource) which returns the value of amount in words.

    If you are binding it to table or output from stored procedure then you need to add a column to the table in result set and populate it with the value of amount in words.

    Now you can bind the label to column/property to show amount in words.

    EDIT: code example (hope this helps you)

    class Program
    {
        static void Main(string[] args)
        {
            Expenses e = new Expenses();
            e.Total = 137313959;
            Console.WriteLine(e.TotalInWords);
            Console.ReadLine();
        }
    
        public class Expenses
        {
            public int Total
            {
                get;
                set;
            }
    
            public string TotalInWords
            {
                get
                {
                    return ConvertToWords(Total);
                }
            }
    
            private static string ConvertToWords(int amount)
            {
                string s = amount + "";
                int g = (s.Length / 3);//groups of three digits
                int a = (s.Length % 3);
                StringBuilder sb = new StringBuilder();
    
                if (g == 0) //only three or less digits
                {
                    sb.Append(ConvertToHunderds(s, false));
                }
                else
                {
                    if (a > 0)
                    {
                        sb.AppendFormat("{0} {1} ", ConvertToHunderds(s.Substring(0, a),
                                 false), groups[g]);
                    }
    
                    int idx = a;
    
                    while (g > 0)
                    {
                        sb.AppendFormat(" {0} {1} ", ConvertToHunderds(s.Substring(a, 3), 
                                         g == 1), groups[--g]);
                        a += 3;
                    }
                }
    
                return sb.ToString();
            }
    
            private static string ConvertToHunderds(string s,bool useAnd)
            {
                char[] c =new char[s.Length];
    
                for (int i = s.Length-1,j=0; i >=0 && j<c.Length; j++, i--)
                {
                    c[j] = s[i];
                }
    
                if (c.Length == 3)
                {
                    if (c[2] == '0')
                        return string.Format("{0}{1}", (useAnd ? "and " : ""), GetTens(c[1], 
                                 c[0]));
                    else
                        return string.Format("{0} hundred {1} {2}", digits[((int)c[2]) -
                                           48],
                            (useAnd ? "and" : ""),
                            GetTens(c[1], c[0]));
                }
                else if(c.Length==2)
                {
                    return useAnd ? "and " : "" + GetTens(c[1], c[0]);
                }
                else
                {
                    return digits[((int)c[0]) - 48];
                }
            }
    
            private static string GetTens(char ten, char one)
            {
                if (one == '0')
                    if (ten == '1')
                        return eleven2nineteen[((int)ten) - 49];
                    else
                        return tens[((int)ten) - 49];
    
                if(ten=='1')
                    return  eleven2nineteen[((int)one) - 49];
    
                return tens[((int)ten) - 49] //because tens[0] = 10 so subtract 49 (ascii 1)
                    + " " 
                    + digits[((int)one) - 48];
            }
    
            private static string[] groups = new[] { ""/*hundreds group*/, "thousand", 
                                 "million", "billion", "trilliion" };
            private static string[] digits = new[] { "zero", "one", "two", "three", "four",
                      "five", "six", "seven", "eight", "nine" };
            private static string[] eleven2nineteen = new[] { "eleven", "twelve", 
                      "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", 
                       "eighteen", "nineteen" };
            private static string[] tens = new[] { "ten", "twenty", "thirty", "fourty", 
                  "fifty", "sixty", "seventy", "eighty", "ninety" };
        }
    

    this outputs:

    one hunderd  thirty seven million  three hunderd  thirteen thousand  nine 
    hundred and fifty nine
    

    PS:- This is for illustration purpose only. Please if (ever) you use it use proper exception handling etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to use linq in C# Windows form application working with .Net Framework
I'm working with a windows form application in C#. I'm using a socket client
I'm working with a windows form application in C#. I'm using a socket client
I am working with Windows form application. In that I retrieve the data from
I am working on a Windows form application with C#,and it would be really
I'm working on a windows form application and I want to have a rich
I have VS2010 and I'm working on a windows form application. So, I have
I'm using Visual Studio 2010 and I'm working on a windows application form. I'm
I am working on a Windows Form-Based application in Visual Studio 2008 using C#
I'm currently working on an application that uses a Windows Form GUI. The main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.