Canarys | IT Services

Blogs

How to pass Images from Report Body to Header/Footer in RDLC

Date:
Author:
Tags:
Share

When using SetData and GetData functions to pass data from report body to report header/footer we can also pass the images.

For example: when creating a multiple document for different companies with different logos. Find the below code to achieve the scenario.

1. Create the following function in Report Properties:

Public Function ConvertPicture(Value)

  If IsNothing(Value) Then

    Return ""

  End If

Return Cstr(Convert.ToBase64String(Value))

End Function

dyn1

 

2.In SetData add the newly created Function with the Field reference to BLOB Field

Code.ConvertPicture(Fields!CheckSignatureTCheckSignature.Value) + Chr(177)

dyn2

3. Use GetData in Image Properties to reference to the respective Field of the SetData Function.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Reach Us

With Canarys,
Let’s Plan. Grow. Strive. Succeed.