Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to display 32-bit image in reports? Collapse All
Subject Author Date
Anil Siddhpura Feb 9, 2009 - 3:25 AM


I have 32-bit image & i want to display this image in reports. But i found that in report it displays only 24-bit 0r lesser bit image. It’s not able to display 32-bit images.
So how to display 32-bit image in reports or is there any function to convert these 32-bit images to 24-bit omage?

Anil Siddhpura Feb 9, 2009 - 5:53 AM


I got the point that 32-bit image creates problem in printing. But how can i convert my 32-bit image to 24-bit & displays it in reports?

I mean how you are converting 32 to 24 bit images?

Technical Support Feb 9, 2009 - 1:30 PM

Prof-UIS converts 32-bit images into 24-bit images on the fly while generating per page metafiles for printing or previewing. You should not do anything. You should not come across any problems with printing and previewing. So, please explain details. Which grid you are using? Which images exactly have any problems?

Anil Siddhpura Feb 9, 2009 - 10:36 PM


I am using CExtReportGrid for reports. I have bitmap images(32-bit). So how to displays these 32-bit Bitmap images on reports? Or is there any function to convert 32-bit image to 24-bits?

Technical Support Feb 10, 2009 - 7:58 AM

You can simply use any of CExtGridCellPicture*** grid cell classes for report items and/or in their preview areas. You do not need to convert any images to any formats. Just load images into picture cells. That’s all.

Anil Siddhpura Feb 20, 2009 - 11:35 PM


I am waiting for your reply. Pl reply to me it’s urgent for me.



Apurv Shah

Technical Support Feb 23, 2009 - 7:29 AM

The CExtGridCellPictureRef class does not store an image. It uses a pointer to an externally stored image. We suspect you assigned an image and then destroyed it. As a result, the CExtGridCellPictureRef class has a pointer to an incorrect image object. Please use the CExtGridCellPicture class instead.

Anil Siddhpura Feb 12, 2009 - 10:18 PM


Yes, I am using ExtGridCellPictureRef class to display Images in reports as shown below:

pCell = ReportItemGetCell( pRGC, pRGI, RUNTIME_CLASS(CExtGridCellPictureRef) );
((CExtGridCellPictureRef*)pCell)->BitmapSetBuffer( pBmp );

where pBmp contains the BMP file. But when my Image is 32-bit, it’s not able to display it properly. And when I use my 24-bit image it displays it properly.

Apurv Shah

Technical Support Feb 9, 2009 - 5:14 AM

The grid windows are 32-bit displaying images inside grid cells. This is also related to the in row preview area inside the report grid window. But it’s not possible to use 32-bit images in the printing/previewing output directly. We noticed the application crashes when drawing 32-bit images into the printer based HDC context. We suspect such crashes occur because the printer drivers often cannot work with 32-bit images. In some cases crashed does not occur but the 32-bit images are painted incorrectly. We tested this problem using many printer drivers from different well known vendors. Prof-UIS solves this problem with printing/previewing of 32-bit images. It creates memory HDC based on the 24-bit bitmap, draws white background into it and then draws 32-bit image over white background. Finally, the 24-bit image created on-the-fly is used in printing/previewing.