<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : 11.2.0 CXTPReportControl Remove/AddRecordEx</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : 11.2.0 CXTPReportControl Remove/AddRecordEx]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 16:45:29 +0000</pubDate>
  <lastBuildDate>Sat, 15 Sep 2007 12:35:05 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=8020</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[11.2.0 CXTPReportControl Remove/AddRecordEx : The logic you have outlined for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8020&amp;PID=25943&amp;title=11-2-0-cxtpreportcontrol-remove-addrecordex#25943</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2126">bschaer</a><br /><strong>Subject:</strong> 8020<br /><strong>Posted:</strong> 15 September 2007 at 12:35pm<br /><br /><DIV>The logic you have outlined for updating record data does not work with 11.2.0 because on the RemoveRecordEx call, the record is deleted upon InternalRelease.&nbsp; So I wrapped the Remove/Add with AddRef/Release (below) and this creates a new problem with the row logic at XTReportRow.cpp line 814&nbsp;(<FONT size=1>ASSERT(m_pParentRows-&gt;GetAt(m_nChildIndex) == </FONT><FONT color=#0000ff size=1>this</FONT><FONT size=1>);</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>When only one record is added/updated, no ASSERT triggered.&nbsp; On second record added then updated you get it.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>I need on the fly inserts and updates without using Populate.&nbsp; The updates need to perform resort/regroup as necessary and I believe you have coded that way.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>This is a critical situation that I need resolution on soon.&nbsp; Thanks.</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>For new record:</FONT></DIV><DIV><FONT size=1>CMyReportRecord* pNew = </FONT><FONT color=#0000ff size=1>new</FONT><FONT size=1> CMyReportRecord();</FONT></DIV><DIV><FONT size=1><DIV><FONT size=1>pRecord-&gt;m_pSomeItem-&gt;SetValue(SomeInitialValue);</FONT></DIV>GetReportCtrl().AddRecordEx(pNew);</FONT></DIV><DIV><FONT size=1>GetReportCtrl().RedrawControl();</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV><DIV><FONT size=1>For update record:</FONT></DIV><DIV><FONT size=1>pRecord-&gt;m_pSomeItem-&gt;SetValue(SomeNewValue);</FONT></DIV><DIV><FONT size=1>pRec</FONT><FONT size=1>ord-&gt;InternalAddRef();</FONT></DIV><DIV><FONT size=1>GetReportCtrl().RemoveRecordEx(pRecord);</FONT></DIV><DIV><FONT size=1>GetReportCtrl().AddRecordEx(pRecord);</FONT></DIV><DIV><FONT size=1>pRecord-&gt;InternalRelease();</FONT></DIV><DIV><DIV><FONT size=1>GetReportCtrl().RedrawControl();</FONT></DIV><DIV><FONT size=1></FONT>&nbsp;</DIV></DIV>]]>
   </description>
   <pubDate>Sat, 15 Sep 2007 12:35:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8020&amp;PID=25943&amp;title=11-2-0-cxtpreportcontrol-remove-addrecordex#25943</guid>
  </item> 
 </channel>
</rss>