How to make first field in crystal report 8.5 formula bold containing concatenation more than two fields

Posted on 2004-11-23
Last Modified: 2012-08-13
   i am using crystal report 8.5 and have formula which
 contains two fields like @emp_data (formula)
 which contains two fields
 ({emp.emp_name}) + ' ' + ({emp.emp_add})

 i want ({emp.emp_name})  should appear in bold
 while rest in i.e. ({emp.emp_add})
in normal character.

 i have tried with paragraph formatting to html text
 but its giving error in formula as well as truncating rest part i.e. address.
Also , doing bold the whole formula is not i want.

hope to get answer soon...


Question by:sensitive
    LVL 13

    Accepted Solution

    This works with CR 8 and 9, so I assume it will work in 8.5:

    "<b>" + {emp.emp_name} + "</b> - " + {emp.emp_add}

    As long as both fields are strings, and the length of the strings combined is <= 254 characters, that should work.


    Author Comment

    hi dave
      thanx 4 takin interest . i have tried it
    but its not working infact it is concatting with
    like output:
    <b> John</b>- A 77 .....
    i have tried this with paragraph formatting
    option with text to html as well as none option
    out put is same.
    Any other way
    LVL 13

    Expert Comment

    Place a text object onto the report, and make it as wide as {emp.emp_name} + ' ' + {emp.emp_add} can be.  Put the {emp.emp_name} field on the report, make it bold, then drag it into the text object.  Put your cursor in the text object after {emp.emp_name}, and put a space.  Then, just drag the {emp.emp_add} field into the text object.



    Author Comment

    hi dave

       wat u have told me this time was doing earlier
     there was problem with formatting as name
     was taking sometimes 2 lines while address
     sometimes was taking more than allocated
     space thats why i have to combine them in
     formula with address starting from new line
     Here in formula only problem i faced was
     bolding of first field i.e. name here.

     as with html syntax am i missing something
     thats why it taking as string combining with name
     wat do u say.....


    Author Comment

    hi dave
               i have accepted ur paragraph formatting
     ans but its not working with same version of
     crystal report 8.5 on required  machine
     any reason!!!!!!!!!!1


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    Read about achieving the basic levels of HRIS security in the workplace.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now