on 2009 Sep 04 7:01 AM
We have a Problem when printing images (blobObject).
We are printing all displayed images immediately on the report. The images are represented on the report by Blob objects. At runtime we create a Bitmap object in memory, which is stored in a memory stream, the byte array of MemoryStream is placed in the field of the DataSet, which has deposited on the report as BlobObjekt.
The error that occurs is that some Windows-User didnu2019t see all pictures. But without any Errormessage, the picture is still white.
All users use the same Windows-PC with the Crystal Report Version 10.2.3600.0 .
The difference between the pictures is simple:
Picture 1)
- Note: This picture appears properly
- This one exists as JPG-File on the harddisk
- We read the image, convert it into a memory stream and place the byte array in de DataSet-Field
- This images are positioned in the header and footer section
Picture 2)
- Note: this picture does not display properly
- This one is created by the application
- It is created in memory by an graphics-object
- This graphics-Object is converted into an memory stream and so on
- This images are positioned in the details section
Here are the piece of code, which is the dataset supplied with pictures. (abbreviated version)
Using stream As IO.MemoryStream = New IO.MemoryStream
Using dest As Bitmap = New Bitmap(field.Width, field.Height)
Using gd As Graphics = Graphics.FromImage(dest)
gd.Clear(Color.White)
gd.DrawImage(Source, destrect, sourcerect, GraphicsUnit.Pixel)
dest.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp)
End Using
End Using
ds.Tables(datasourceTableName).Rows(j)(datasourceName) = stream.ToArray
stream.Close()
End Using
Has anyone an ideo whats going wrong?
The logic to print the images is always the same only the windows user is different.
Is this a web or windows based application?
Is this happening on the same computer but with a different user? It could be a user rights issue. Try using the Process Monitor tool to see if it is highlighting any permissions issues.
Regards,
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.