Print Page | Close Window

Report Control stopped printing Icons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24153
Printed Date: 05 May 2024 at 2:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Report Control stopped printing Icons
Posted By: PanicMan
Subject: Report Control stopped printing Icons
Date Posted: 11 May 2021 at 10:45am
Hello,

since some time, we don't know for sure since when, because an customer reported it, XTP Report Control stopped printing out icons, just an small dot is printed out.
We have v16.3 out at the customers, I tested here with 16.3 and 17.3 both have the same issue.
18.6 and 19.1 I have also here, but can't test as all the solution files are missing. Confused
Tested here with the Report Control Sample, unmodified, It also don't print out the Icons:

What is really interesting, Glyphs are printed out, everything else not:

Here the printout:

Tested it with several real printers, also PDF printers, all the same...
My System: Windows 10 x64 20H2 with all Updates installed.

Is anyone also have that error?
I tried to replace the report imagelist with glyphs image list, works well in the sample, but printout is the same...

Tried to debug the source, everything fine, no assertions, no errors, StretchBlt in the CXTPImageManagerResource::Draw Method returns true, so everything works fine, but still no Icons...

Any Ideas?

Greetings Jack



Replies:
Posted By: PanicMan
Date Posted: 12 May 2021 at 4:51am
I found something out...

in the CXTPReportPaintManager::DrawItemBitmap Function, there is a difference between printing or not:
	// draw image
	if (pDrawArgs->pDC->IsPrinting())
	{
		CBitmap bmp;
		bmp.CreateCompatibleBitmap(pDrawArgs->pDC, szImage.cx, szImage.cy);
		CXTPCompatibleDC dcMem(NULL, &bmp);
		dcMem.FillSolidRect(0, 0, szImage.cx, szImage.cy, pDrawArgs->pDC->GetBkColor());
 
		pIcon->Draw(&dcMem, CPoint(0, 0), pIcon->GetIcon());
		pDrawArgs->pDC->BitBlt(ptIcon.x, ptIcon.y, szImage.cx, szImage.cy, &dcMem, 0, 0, SRCCOPY);
	}
	else
	{
		pIcon->Draw(pDrawArgs->pDC, ptIcon, pIcon->GetIcon(), 0, pDrawArgs->pRow->IsSelected() ? GetXtremeColor(COLOR_HIGHLIGHT) : CLR_NONE, pDrawArgs->pRow->IsSelected() ? GetXtremeColor(COLOR_HIGHLIGHT) : CLR_NONE, pDrawArgs->pRow->IsSelected() ? ILD_SELECTED : 0);
	}


For printing out Glyphs, there is no difference and when I comment out the IsPrinting Block out, everything works fine.
So the question is, is that important? I tested on two printers plus PDF Printer, everything fine.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net