CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Posts
    2

    Word count in a field

    I need to find how many times a particular word appears in a particular field.

    How can i do that?

    for an instance - (jan,mar,jan,feb,aug,sep,jan)

    how many "Jan"'s in the above field?

  2. #2
    Join Date
    May 2006
    Posts
    324

    Re: Word count in a field

    You could use Split to get each element into an array and then loop through them.

  3. #3
    Join Date
    Dec 2007
    Posts
    13

    Re: Word count in a field

    Put the field in the detail secton and either use the sum tab and use the DistinctCount option or write a a formula
    "DistinctCount (your field)"

  4. #4
    Join Date
    May 2006
    Posts
    324

    Re: Word count in a field

    It looks like Crystal Fire and I have understood your question differently.
    Do you have a field which contains the string "(jan,mar,jan,feb,aug,sep,jan)" and you want to know how many times Jan appears in it, or do you have a field containing one month name and you want to know how many times each month name appears in the report?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured