Print Page | Close Window

CXTPReportControl crashed !

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=13993
Printed Date: 29 September 2024 at 7:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportControl crashed !
Posted By: czlai
Subject: CXTPReportControl crashed !
Date Posted: 12 April 2009 at 9:25pm
A CXTPReportRecord in the CXTPReportControl, that was SetVisible(FALSE).
Then Delete the record will cause a crash !
To avoid the problem, I should SetVisible(TRUE) and Populate() before delete it !



Replies:
Posted By: inmaurik
Date Posted: 14 April 2009 at 9:39am
Shouldn't you call RemoveRecordEx when you want to remove a record without calling Populate? After you have removed the record (with bRemoveFromParent = TRUE) you can delete the record.


virtual BOOL RemoveRecordEx(
    CXTPReportRecord* pRecord,     // Pointer to the record
    BOOL bAdjustLayout = TRUE,     // If TRUE AdjustLayout will be called
    BOOL bRemoveFromParent = TRUE // If TRUE the record is to be removed from the parent
);


-------------
Product: Xtreme SuitePro (MFC) version 13.3.1
Platform: Windows 7 Enterprise (64bit)
Language: C++ (Visual Studio 2008 SP1)



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