locked
Email Body color should be unique while displaying it as a field in SSRS Report RRS feed

  • Question

  • Hi All,

    We have created a SSRS Report to show the activities created by the team.(Query type: Fetch XML)

    Activities includes Tasks,Emails,phone calls and Appointments.My problem is that only while displaying the Emails in the report, the initial mail is shown in black as usual but the reply message is in the blue since the team copy pastes the content as it is from the mail to CRM activities. I tried changing the font color, place holder properties etc but no use.

    Could any 1 please help me to have a unique font and color while displaying the email content in the field of SSRS report.

    Regards

    Rekha .J

    Thursday, December 4, 2014 6:00 AM

Answers

  • Use this expression:

    =Replace(Fields!description.Value,"style=""COLOR: #1f497d""","")

    Regards, Saad

    • Marked as answer by Rekha J Monday, December 8, 2014 9:28 AM
    Monday, December 8, 2014 9:19 AM

All replies

  • Right click on the cell and Click Textbox Properties. Change font colour from here

    Regards, Saad

    Thursday, December 4, 2014 6:43 AM
  • Hi Saad,

    Tried that also but no use.... Still same problem.

    Regards,

    Rekha.J


    • Edited by Rekha J Thursday, December 4, 2014 7:00 AM
    Thursday, December 4, 2014 7:00 AM
  • let me check it get back to you

    Regards, Saad

    Thursday, December 4, 2014 7:07 AM
  • Okay.Thank u.

    Regards,

    Rekha.J

    Thursday, December 4, 2014 7:08 AM
  • Hi,

    description field is html. Color tags in description html are overriding the the colors.

    In order to make it it same color you need to remove the color tag from the description like this

    replace(E.Description, 'style=''color:#1F497D''' , '')

    Colour code may vary in your description field so check it first before replacing it.

    I tested and got the below result.


    Regards, Saad


    • Edited by Mohd Saad Thursday, December 4, 2014 8:00 AM
    Thursday, December 4, 2014 7:57 AM
  • Hi,

    Thanks for the reply.

    used similar expression like this ----> replace(Fields!ActivityDescription.Value,'style=''color:#1F497D''' , '') but syntax error

    so changed to:

    =Replace(Fields!ActivityDescription.Value,"style=color:#1F497D","''") used this way but no changes to the report o/p.

    Regards,

    Rekhka.J

    Thursday, December 4, 2014 10:40 AM
  • all the quotes are single quotes.

    Replace(Description,'style=''color:#1F497D''','')
    make this change in sql query not on report.

    Also please paste your description field in html format for the record which is showing blue colour


    Regards, Saad


    • Edited by Mohd Saad Thursday, December 4, 2014 11:04 AM
    Thursday, December 4, 2014 11:01 AM
  • Hi,

    We use fetch XML query.

    Regards, 

    Rekha.J

    Monday, December 8, 2014 4:57 AM
  • Create a calculated field description1 in your Dataset like the screenshot below:

    In Expression use this:

    =Replace(Fields!description.Value,"style='color:#1F497D'","")

    Click on OK and Use this calculated field in your table.


    Regards, Saad

    Monday, December 8, 2014 5:33 AM
  • Tried the same, now no error but no color changes also in the output.
    Monday, December 8, 2014 7:00 AM
  • can you paste your html mail body. I think colour code is different there.

    Regards, Saad

    Monday, December 8, 2014 8:34 AM
  • Seems like same color as you mentioned in the code.

    Reply Email:

    <SPAN style="FONT-SIZE: 12pt; "><FONT face=Calibri> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d">Hi Shashank:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d"><o:p>&nbsp;</o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d">Thanks for reaching out.&nbsp; I’m available on Wednesday, Nov 5<SUP><FONT size=2>th</FONT></SUP> @10am EST to discuss your services.&nbsp; What number can I reach you?<o:p></o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d"><o:p>&nbsp;</o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d">Best regards,<o:p></o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt" style="COLOR: #1f497d">Nausheen<o:p></o:p></SPAN></P>

    Inital Mail:

    <SPAN style="COLOR: black; FONT-SIZE: 12pt; "> 

    Monday, December 8, 2014 9:05 AM
  • Use this expression:

    =Replace(Fields!description.Value,"style=""COLOR: #1f497d""","")

    Regards, Saad

    • Marked as answer by Rekha J Monday, December 8, 2014 9:28 AM
    Monday, December 8, 2014 9:19 AM
  • Thank u so much Saad... It works:)

    also to change the font also I should write the same expression with AND condition to above expression right?.

    Regards,

    Rekha.J

    Monday, December 8, 2014 9:28 AM
  • Dont' Use and condition. Use Replace within Replace.

    Like below:

    =Replace(Replace(Fields!description.Value,"FONT-SIZE: 12pt;", "FONT-SIZE: 10pt;"),"style=""COLOR: #1f497d""","")


    Regards, Saad

    Monday, December 8, 2014 10:24 AM
  • Thank u saad.

    Regards,

    Rekha.J

    Monday, December 8, 2014 11:48 AM
  • Hi Saad,

    =Replace(Replace(Replace(Replace(Fields!ActivityDescription.Value,"FONT face=Times New Roman", "FONT face=Arial"),"FONT face=Calibri", "FONT face=Arial"), "FONT-SIZE: 12pt;", "FONT-SIZE: 8pt;"),"style=""COLOR: #1f497d""","")

    used this expression- font face, i have to change calibri and times new roman to Arial, So tried this way. This expr workes for calibri to Arial but not in case of times new roman to Arial, am I writing wrong expr?

    Tuesday, December 9, 2014 7:18 AM
  • Hi,

    Can you check if "FONT face=Times New Roman" is present in your HTML. IF yes what is the exact text.

    Also you can put this field in another column and check whether "FONT face=Times New Roman" is changed to "FONT face=Arial" in html.


    Regards, Saad

    Tuesday, December 9, 2014 7:57 AM
  • Its the same I copied and pasted to in the query.

    <FONT face="Times New Roman"><B><SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt; " lang=EN-IN>Functional testing</SPAN></B><SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt; " lang=EN-IN>: Both Manual &amp; Automated Regression testing<o:p></o:p></SPAN></FONT></LI> <LI style="TEXT-ALIGN: justify; LINE-HEIGHT: 115%; MARGIN: auto auto 10pt; " face="Times New Roman"><B><SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt; " lang=EN-IN>

    Regards,

    Rekha.J

    Tuesday, December 9, 2014 9:36 AM
  • Use something like this:

    =Replace(Replace(Replace(Replace(Fields!ActivityDescription.Value,"FONT face=""Times New Roman""", "FONT face=Arial")

    ,"FONT face=Calibri", "FONT face=Arial"), "FONT-SIZE: 12pt;", "FONT-SIZE: 8pt;"),"style=""COLOR: #1f497d""","")



    Regards, Saad


    • Edited by Mohd Saad Tuesday, December 9, 2014 10:27 AM
    Tuesday, December 9, 2014 10:27 AM
  • Hi,

    Is there a way to change any font/any style with single single font/style.

    I used the above expression and was able to change Times new Roman and calibri to Arial but now users are using different colors and fonts, to change everything to unique is their a replace expression to change any font/color to Arial/Black.

    Regards,

    Rekha.J

    Friday, December 19, 2014 8:52 AM