The DD Reports Image control cannot automatically display OLE picture objects, but these objects can be converted into a usable format by cutting off the OLE object header via custom code. Here is an example of such code:
Public Function ImageStrip(ByVal Picture As Byte()) as Byte() Dim strippedImageLength As Integer = Picture.Length - 78 Dim strippedImageData(strippedImageLength) As Byte Array.Copy(Picture,78, strippedImageData, 0, strippedImageLength) Return strippedImageData End Function
Note: The length of the OLE header depends on the mimetype used to create it. In our example we converted the OLE object, based on the bitmap image to an actual Bitmap format (Ole header length in this case will be 78 bytes) To use this example you should set the value property of the image control (Value of the BackgroundImage for other controls) to "=Code.ImageStrip(Fields!Picture.Value)" and the source property to "Database" (assuming your pictures are stored in a Picture field in the database)
|