web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

VS2012 SSRS - ACTIVITIES - can I have icons for activity type? instead of appointment, task etc..

(0) ShareShare
ReportReport
Posted on by 4,515

Hi all,

I am building a report in VS2012 and I have a table for my activities which then show tasks, appointments, emails etc.. I was wondering whether instead of activity type column I could have icons for the activities? Does anyone know whether this is difficult to implement?

Thanks so much

Dan

*This post is locked for comments

I have the same question (0)
  • Feridun Kadir Profile Picture
    1,705 Most Valuable Professional on at

    Yes you can do this, I think you will need another column in your table, tablix etc for the image. You will also need to add the images to the report. Then I think you can use an expression in the table cell to select the correct image base on the activity type.

  • donyc Profile Picture
    4,515 on at

    I tried below but I am getting an error.. where am I going wrong here??? I tried both ways 2 options:

    Option A

    column 1:  insert image from toolbox and add expression? =Iif(Fields!ActivityTypeCode.Value = "4202", "appointment", IIF(Fields!ActivityTypeCode.Value = "4201", "phone", "task"))

    column 2: just select field activitytypecode

    or Option B?

    column 1:  insert image from toolbox and click "Use this image" for appointment (then do this for all other images, which means 3 rows in total)

    column 2: add the expression: =Iif(Fields!ActivityTypeCode.Value = "4202", "appointment", IIF(Fields!ActivityTypeCode.Value = "4201", "phone", "task"))

  • Suggested answer
    Mamatha Swamy Profile Picture
    5,426 on at

    I don't think you should add 3 rows for each image type.

    Please refer

    www.beakersoft.co.uk/.../working-with-images-in-reporting-services

    www.mssqltips.com/.../display-graphics-dynamically-in-sql-server-reporting-services

  • donyc Profile Picture
    4,515 on at

    I tried first one and I got it to work with: =iif(Fields!Stop_Stat.Value = “Stop”, False, True)

    but only if I use one image.. It is not clear what to do when I have 3 images I need to alternate: appointment, task, email.

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Dony,

    You are using CRM Online right?

    I think there is a problem when you try to get the:

    Fields!ActivityTypeCode.Value

    To check first, before you bother about the image,

    "Iif(Fields!ActivityTypeCode.Value = "4202", "appointment", IIF(Fields!ActivityTypeCode.Value = "4201", "phone", "task"))"

    can you check by giving expression to one of the column to: Fields!ActivityTypeCode.Value ?

    I just want to see whether the report can get the "42020", "4201", etc.

    Thanks.

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Anyway Dony,

    I found an article:

    www.crmsoftwareblog.com/.../crm-reporting-undocumented-feature-uncovered

    Have you try this syntax:

    Microsoft.Crm.Reporting.RdlHelper.HtmlUtility.GetImage (Fields!ActivityTypeCode.Value)

    Read more at: www.crmsoftwareblog.com/.../crm-reporting-undocumented-feature-uncovered | CRM Software Blog

    Instead of you do hardcoding using IF Else.

    Thanks.

  • donyc Profile Picture
    4,515 on at

    Hi Aileen, thanks for feedback. If I understand correctly do you mean, just add below to an empty cell?

    = Iif(Fields!ActivityTypeCode.Value = "4202", "appointment", IIF(Fields!ActivityTypeCode.Value = "4201", "phone", "task"))"

    I still get an error

  • Aileen Gusni Profile Picture
    44,524 on at

    Dony,

    Correct.

    So you still get the error.

    It does mean your report expression even cannot get the Fields!ActivityTypeCode.Value, so cannot get the image works.

    Make sure that the tablix is inside the dataset.

    Test again can you use :

    Fields!ActivityTypeCode.Value

    And can you use the expression in the column second column (Activity type from your previous screen)? if it does result any data no error (don't include first your syntax error before), then you can use that expression.

    Thanks.

  • donyc Profile Picture
    4,515 on at

    Hi Aileen,

    do you mean like this234.jpg

    if I do that, then it works ok, no errors..results below

  • Suggested answer
    Mamatha Swamy Profile Picture
    5,426 on at

    Dony,


    1. Observe that you are getting the activity name (appointment) instead of objecttypecode(4202). So change your expression accordingly

    2.  The error shows that it is not able to refer your dataset. http://technet.microsoft.com/en-us/library/cc879331(v=sql.105).aspx. Its a good idea to first toggle with sample text and then replace with images

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans