- Crystal report shows below error when Blob image is inserted.
Error: "The exception Integer division by zero.(0xc0000094) occurred in the application location 0x2c03a347" when Blob image is inserted into Crystal Report.
- When clicked on OK Crystal Reports shows very large size of the image.
Reproducing the Issue
- Create a Crystal report based on Oracle database with OLEDB connectivity which contains Blob images.
- Insert the image into the report.
- Refresh the report to Preview.
- Crystal Report XI Release 2 Service Pack 4
- Oracle 10g with Service Pack 2
- The error message occurs because of the way Crystal engine calculates the size of the image to be inserted.
- "Suppose a user has a 500(width) by 344(height) picture and wants to insert it into CR
1) If the resolution of the picture is 96 dpi, then the size appeared in CR will be the same as original size.
2) If the resolution is not 96 dpi, say 72 dpi, then CR will calculate in the following way,
a)Use "System DPI"/"picture DPI" to get a number, in this case, 96dpi/72dpi = 1.33
b)Use this number times the width/height of the picture to get the actual width/height appeared in CR
In this case, the actual width will be 665 pixel(=500*1.33 ) and the actual height will be 457(=1.33*344)
You can double check the numbers by measuring the actual width/height in CR
- If the DPI is reduced to too low value it would show the error.
- Report will show the original image size if the DPI of the image is set to 96dpi. If DPI is less than 96 then the image size will increased and if image size is more than 96dpi then image size will be decreased.
- Open the Image in any photo editor like MS Paint.
- Save it as JPEG,PNG or BMP image which restores both horizontal and vertical resolution to 96dpi.
- Insert these Images into Database in place of the old images.
- Now use these images in the report.
Also Please refer the KBase 1283043
Picture, Big Image , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem