Dynamically Changing Images In RDLC Report

When creating a multiple document for different companies with different images, we are supposed to pass images based on the companies. Generally, to pass data from report body to report header/footer we use SetData and GetData functions. Similarly, we can also pass images by implementing the below mentioned code.

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 

2.In SetData add the newly created Function with the Field reference to BLOB Field 
Code.ConvertPicture(Fields!CheckSignatureTCheckSignature.Value) + Chr(177) 

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

For more details kindly visit our LinkedIn page:

https://www.linkedin.com/company/allgrow-technologies-pvt-ltd/mycompany/

or you can write us on  contact@allgrowtech.com

Facebook
Twitter
LinkedIn

By Manasa D.

Author

Leave a comment

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