Contents tagged with LINQ

  • Adding an expression based image in a client report definition file (RDLC)

    In previous posts, I showed you how to create a report using Visual Studio 2010 and how to add a hyperlink to the report

    In this post, I show you how to add an expression based image to each row of the report. This is similar to displaying a checkbox column for Boolean values.  A sample project is attached to the bottom of this post.

    To start off, download the project we created earlier from here.  The report we created had a “Discontinued” column of type Boolean. We are going to change it to display an “available” icon or “unavailable” icon based on the “Discontinued” row value. 
     image
    Load the project and double click on Products.rdlc. With the report design surface active, you will see the “Report Data” tool window. Right click on the Images folder and select “Add Image..”
    image 
    Add the available_icon.png and discontinued_icon.png images (the sample project at the end of this post has the icon png files)