Results 1 to 8 of 8

Thread: insert text in selected record

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    471

    insert text in selected record

    I want disply my query result(result1, result2, result3) like this:

    A. result1
    B. result2
    C. result3

    How can I insert the A, B, and C in it? Thanks.

  2. #2
    Lively Member
    Join Date
    Mar 2006
    Posts
    94

    Re: insert text in selected record

    Quote Originally Posted by Palmtree
    I want disply my query result(result1, result2, result3) like this:

    A. result1
    B. result2
    C. result3

    How can I insert the A, B, and C in it? Thanks.
    I can think of at least one way, but just to be sure, how is the report obtaining data? Directly from the database, ttx file or ...?
    Energy can be neither created not destroyed. It can only be wasted.

    Red Green

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    471

    Re: insert text in selected record

    Thanks for the reply. I get data from database.

  4. #4
    Lively Member
    Join Date
    Mar 2006
    Posts
    94

    Re: insert text in selected record

    Quote Originally Posted by Palmtree
    Thanks for the reply. I get data from database.
    Here's a quick and dirty way that works fine as long as there isn't more than 26 records. If there is, then you have to change the formula to handle it.

    1. Create a formula field on the report.
    2. In the formula field put this formula:
    chr(64 + RecordNumber) & "."
    3. Place the formula field on the left of the record in the detail line.
    4. run the report.

    Remember that will only work from A to Z. After that then you get a to z and 0 to 9 and then whatever ascii character corresponds with the formula.

    HTH
    Energy can be neither created not destroyed. It can only be wasted.

    Red Green

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    471

    Re: insert text in selected record

    Thanks so much. I will give it a try.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    471

    Re: insert text in selected record

    Oh, forgot tell you that I use crystal report that comes with VB.net. So how to create a formula field?

  7. #7
    Lively Member
    Join Date
    Mar 2006
    Posts
    94

    Re: insert text in selected record

    Quote Originally Posted by Palmtree
    Oh, forgot tell you that I use crystal report that comes with VB.net. So how to create a formula field?
    Off the top of my head, it's the same way as always. Go to Insert, field objects and formula field or look it up in the help. I'm not at work now so I can't look

    Once the formula field is in the list of database objects, simply place it on the report where I told you and yer golden.
    Energy can be neither created not destroyed. It can only be wasted.

    Red Green

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    471

    Re: insert text in selected record

    got it!! thanks.

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