Problem with CXTPReportRecordItemPreview
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=6003
Printed Date: 22 November 2024 at 2:17am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Problem with CXTPReportRecordItemPreview
Posted By: Paddy
Subject: Problem with CXTPReportRecordItemPreview
Date Posted: 05 January 2007 at 5:41am
Hi,
there seems to be a problem when using CXTPReportRecordItemPreviews (V10.4.0)
To reproduce: 1) enable preview with "Toggle Preview Mode". 2) After doing several clicks in some rows I always get a crash at " InternalAddRef();" in "void CXTPReportRecordItem::OnClick(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)"
Apart from that a question:
m_pPreviewItem = new CXTPReportRecordItemPreview(m_HintText); m_pPreviewItem->SetBold(true); m_pPreviewItem->SetTextColor(RGB(255,0,0));
SetPreviewItem((CXTPReportRecordItemPreview*)m_pPreviewItem);
SetBold and SetTextColor have no influence for the preview display. Does this makes sense? Or do I have to change the metrics for display??
Greets,
Patrik
|
Replies:
Posted By: Paddy
Date Posted: 05 January 2007 at 8:18am
Hi again,
got the solution:
there was no column for a preview item - so I've modified the onclick method:
if (pClickArgs->pRow != NULL) pClickArgs->pRow->InternalAddRef(); if (pClickArgs->pColumn != NULL) pClickArgs->pColumn->InternalAddRef(); InternalAddRef(); pClickArgs->pControl->InternalAddRef();
.... if (pClickArgs->pRow != NULL) pClickArgs->pRow->InternalRelease(); if (pClickArgs->pColumn != NULL) pClickArgs->pColumn->InternalRelease(); InternalRelease(); pClickArgs->pControl->InternalRelease();
But I'm not sure if there could be other problems after the change!
Greets,
Patrik
|
Posted By: sserge
Date Posted: 05 January 2007 at 4:54pm
Yes, your code is fine. Something like this will be included into the next release.
-- WBR, Serge
|
|