Results 1 to 5 of 5

Thread: [RESOLVED] Bold Text

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    58

    Resolved [RESOLVED] Bold Text

    Hello all you guru's! Got a question for you. What I have is a program that takes appointments, and I have a Crystal Report to show all the appointments. What I'm looking to do is to have the time of appointment BOLD "if" the appointment was "created" on today's date (the date you are viewing the schedule). Basicly a way to tell if an appointment was made on the this date so you'd know it's a new appointment. Any suggestions would be GREAT! Thank you very much. Oh I'm using CR 10 Professional

    Thanks!

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Bold Text

    Open the report in Crystal, select the field you want to format and right-click. Select Format Field... from the context menu. When the Format Editor displays, click on the Font tab and click on the formula button for Style. Add this in the formula editor (obviously using your field name):
    Code:
    If {mytable.mydate} = Today Then
        crBold
    Else
        DefaultAttribute
    That should do the trick.

    EDIT: BTW this is for Crystal 9, but should be similar for v10
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    58

    Re: Bold Text

    Quote Originally Posted by pnish
    Open the report in Crystal, select the field you want to format and right-click. Select Format Field... from the context menu. When the Format Editor displays, click on the Font tab and click on the formula button for Style. Add this in the formula editor (obviously using your field name):
    Code:
    If {mytable.mydate} = Today Then
        crBold
    Else
        DefaultAttribute
    That should do the trick.

    EDIT: BTW this is for Crystal 9, but should be similar for v10
    Hello and thank you for your reply! I tried this and it might work but I am getting an error. This is what I have:

    If {Repair.Create Date} = Today Then
    crBold
    Else
    DefaultAttribute

    I get an error that says: A string is required here

    It highlights "Today"

    Any ideas?

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

    Re: Bold Text

    It looks like the Create Date field is not a true datetime field but it is defined as a Text/Character field which happens to contain a date.

    If that is the case, use the following changing the date format to your requirements.

    If {Repair.Create Date} = ToText(Today, "MM/dd/yyyy") Then

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    58

    Re: Bold Text

    Quote Originally Posted by brucevde
    It looks like the Create Date field is not a true datetime field but it is defined as a Text/Character field which happens to contain a date.

    If that is the case, use the following changing the date format to your requirements.

    If {Repair.Create Date} = ToText(Today, "MM/dd/yyyy") Then

    Worked like a charm! Thank you VERY MUCH!!

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