Reformat value from a field

  • Hi All,

    Is there any way to re-format value from a field?

    I want to create a report (export to excel format) using item "Table".

    There is an "email_list" field I would like to re-format. The field contents a list of email address. (sample: aaa@bbb.com;xxx@yyy.com;zzz@aaa.com). I want to reformat this field to add a "return" after each email address. So that the email addresses will be shown one by one in the same textbox like this

    Sample:

    --------------

    aaa@bbb.com

    xxx@yyy.com

    zzz@aaa.com

    --------------

    bbb@ccc.com

    ooo@kkk.com

    --------------

    Can anyone help me? Thanks a lot.

    KK

    (I am using SSRS 2005)

  • I would say it depends on where you are getting the information froma nd how it is stored in teh database. are the multiple e-mail adresses stored in teh database together? If they are then how do you seperate them?

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

  • The email addresses are stored in the same field. Like this:

    Field_1 (FIN report)

    ==============

    RPT-0001

    Field_2 (Email List)

    ==============

    aaa@bbb.com;xxx@yyy.com;rrr@vvv.com

    Field_3(Cc List)

    ============

    111@222.com;ccc@fff.com

    ";" is used to separate them.

  • I think this should work but I have not tested in try to replace the ";" with a char(13) + char(10). Thsi will insert a carriage return and line break.

    REPLACE(col1, ';', (char(10)+CHAR(13)))

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

  • U wanna say the output will look like...

    Field_1 (FIN report) Field_2 (Email List) Field_3(Cc List)

    ============ ============== ==============

    RPT-0001 aaa@bbb.com; 111@222.com;

    xxx@yyy.com; ccc@fff.com

    rrr@vvv.com

    RPT-0002 aaa1@bbb.com; 111a@222.com;

    M i right...???

  • Hi sumit.agrawal,

    Yes, you are right.

    KK

  • Hi Dan.Humphries,

    It's works if I use it to select record in dataset.

    Thanks a lot.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply