Results 1 to 8 of 8

Thread: [RESOLVED] Formula that Concatenates Strings - Can One Be Made Bold?

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Resolved [RESOLVED] Formula that Concatenates Strings - Can One Be Made Bold?

    I have the following formula:

    Code:
    IF ISNULL ({CSU_CLINIC_INFO.CLINIC_NUM}) Then 
      IF {CSU_CLINIC_TYPE.CLINIC_ABRNAME}= 'NORM' Then
         {LOCAL_DOC.DOC_NAME}
      Else
         {LOCAL_DOC.DOC_NAME}+ ' [' + {CSU_CLINIC_TYPE.CLINIC_ABRNAME} + ']'
    Else
      {CSU_NURSE_CLINIC.NURSE_CLINIC_NAME}
    I want the LOCAL_DOC.DOC_NAME (bolded above) to be normal font, while the CSU_CLINIC_TYPE.CLINIC_ABRNAME is displayed as bold in the report. Is that possible?

  2. #2
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: Formula that Concatenates Strings - Can One Be Made Bold?

    Format the field with the Text Interpretation of HTML then change your code to:

    Code:
    IF ISNULL ({CSU_CLINIC_INFO.CLINIC_NUM}) Then 
      IF {CSU_CLINIC_TYPE.CLINIC_ABRNAME}= 'NORM' Then
         {LOCAL_DOC.DOC_NAME}
      Else
         {LOCAL_DOC.DOC_NAME}+ ' <b>[' + {CSU_CLINIC_TYPE.CLINIC_ABRNAME} + ']</b>'
    Else
      {CSU_NURSE_CLINIC.NURSE_CLINIC_NAME}
    See if that works for you. It should work in Crystal XI but I'm only assuming you are using Crystal.

  3. #3

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Formula that Concatenates Strings - Can One Be Made Bold?

    It just prints the <b> in the string, it doesn't format it any differently.

    I'm using Version 11.0.0.1282

  4. #4

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Formula that Concatenates Strings - Can One Be Made Bold?

    Got it working. I needed to right-click on the field and set the "text interpretation" to HTML.

  5. #5
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: Formula that Concatenates Strings - Can One Be Made Bold?

    Post your code. I tried it in one of my reports and it worked. It worked for me in CR8.5 and I just copied the same code into the same report in CR XI R2 11.54.12.1838

    I just used this code

    Code:
    "<b>Help</b> - " & ToText(1000)
    Help is bolded, the - 1000.00 is not
    Attached Images Attached Images  

  6. #6
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: [RESOLVED] Formula that Concatenates Strings - Can One Be Made Bold?

    OK, glad it's working now.

  7. #7

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: [RESOLVED] Formula that Concatenates Strings - Can One Be Made Bold?

    Just one more question....How would I go about adding one more clause to the statement below.

    I now want to say IF the field "SPECIAL" is = "Y", then make the whole text field GREEN.

    Code:
    IF ISNULL ({CSU_CLINIC_INFO.CLINIC_NUM}) Then 
      IF {CSU_CLINIC_TYPE.CLINIC_ABRNAME}= 'NORM' Then
         {LOCAL_DOC.DOC_NAME}
      Else
         {LOCAL_DOC.DOC_NAME}+ '<b> [' + {CSU_CLINIC_TYPE.CLINIC_ABRNAME} + ']</b>'
    Else
      {CSU_NURSE_CLINIC.NURSE_CLINIC_NAME}

  8. #8
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: [RESOLVED] Formula that Concatenates Strings - Can One Be Made Bold?

    Go into the format editor of the field, select the Border tab and use the conditional formula editor beside background. In this area the idea is

    IF the field Special's CurrentFieldValue is "Y" then make it go green.

    There is a Formatting function for CurrentFieldValue. The rest should be clear.

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