Results 1 to 7 of 7

Thread: [RESOLVED] Help With Formula Field

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Resolved [RESOLVED] Help With Formula Field

    This should be an easy one.

    I have a detail line on a label that I want to be two lines.
    For example.

    Location:
    New York

    Is there a way of sending an enter key command in the formula editor.
    So after location it will go to the second line and put the location.

    Now i have something like this
    "LOCATION: " & {LabHist.LOCATION}

    Advice?

    Thanks in advance!

  2. #2
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Help With Formula Field

    Why not use 2 fields? just line them up ontop of each other.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Re: Help With Formula Field

    Quote Originally Posted by Besoup
    Why not use 2 fields? just line them up ontop of each other.
    And that is an option. However, how do i suppress one field if the other is blank.

    If the location field in the db i blank i dont want it to say Location: above it.

  4. #4
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Help With Formula Field

    if {LabHist.LOCATION} = "" then
    ""
    else
    "LOCATION:"

    can try that in a formula field... I didn't test it tho.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Re: Help With Formula Field

    Quote Originally Posted by Besoup
    if {LabHist.LOCATION} = "" then
    ""
    else
    "LOCATION:"

    can try that in a formula field... I didn't test it tho.
    Actually i think i got it. You can format the field and off of suppress i was able to put a function.

    thanks

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: [RESOLVED] Help With Formula Field

    I know this is resolved, just wanted to mention another option. There is no need to use a formula or multiple text objects. It is possible to place database/formula fields inside a Text object along with the label text. Each object within a text object can be independantly formatted.

    Add a new text object
    Type in Location:
    Hit Enter
    From the field explorer, drag the database field into the Text object.

    Your suppression formula would still apply in this case.

    Also, to add a carriage return/line feed in a formula use the chr function.

    "Location: " + chr(13) + {LabHist.LOCATION}
    Last edited by brucevde; Mar 21st, 2007 at 11:25 AM.

  7. #7
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: [RESOLVED] Help With Formula Field

    Thanks Bruce, didn't know that.

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