<?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 : [solved] Report Control crash on removing selected</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [solved] Report Control crash on removing selected]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 05:40:31 +0000</pubDate>
  <lastBuildDate>Thu, 25 Aug 2016 11:38:27 +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=23109</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[[solved] Report Control crash on removing selected : Now OnRemoveRoEx() works fine...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75011&amp;title=solved-report-control-crash-on-removing-selected#75011</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2121">jmarcosf</a><br /><strong>Subject:</strong> 23109<br /><strong>Posted:</strong> 25 August 2016 at 11:38am<br /><br />Now OnRemoveRoEx() works fine for me.<br>Thanks a lot!<br>]]>
   </description>
   <pubDate>Thu, 25 Aug 2016 11:38:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75011&amp;title=solved-report-control-crash-on-removing-selected#75011</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Report Control crash on removing selected : also different methods of removing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75003&amp;title=solved-report-control-crash-on-removing-selected#75003</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23109<br /><strong>Posted:</strong> 24 August 2016 at 12:08pm<br /><br /><span style="line-height: 16.8px;">also different methods of removing rows and records had different results (crashes or not)</span><br style="line-height: 16.8px;"><br style="line-height: 16.8px;"><span style="line-height: 16.8px;">next sample method removes incorrect &nbsp;before and after fix</span><br style="line-height: 16.8px;"><div style="line-height: 16.8px;">Samples\ReportControl\ReportSample\TestNotificationsDlg.cpp</div><div style="line-height: 16.8px;"><table width="99%"><tr><td><pre class="BBcode">void CTestNotificationsDlg::OnRemoveRowEx()</div><div style="line-height: 16.8px;">{</div><div style="line-height: 16.8px;">&nbsp; &nbsp; CXTPReportSelectedRows *pSelectedRows = m_wndReport.GetSelectedRows();</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">&nbsp; &nbsp; for (int <font color="#ff0000">nRow=0</font>; nRow&lt;pSelectedRows-&gt;GetCount(); <font color="#ff0000">nRow++</font>)</div><div style="line-height: 16.8px;">&nbsp; &nbsp; {</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow *pRow = pSelectedRows-&gt;GetAt(<font color="#ff0000">nRow</font>);</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; m_wndReport.RemoveRowEx(pRow);</div><div style="line-height: 16.8px;">&nbsp; &nbsp; }</div><div style="line-height: 16.8px;">}</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">void CTestNotificationsDlg::OnRemoveRecordEx()</div><div style="line-height: 16.8px;">{</div><div style="line-height: 16.8px;">&nbsp; &nbsp; CXTPReportSelectedRows *pSelectedRows = m_wndReport.GetSelectedRows();</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">&nbsp; &nbsp; for (int <font color="#ff0000">nRow=0</font>; nRow&lt;pSelectedRows-&gt;GetCount(); <font color="#ff0000">nRow++</font>)</div><div style="line-height: 16.8px;">&nbsp; &nbsp; {</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow *pRow = pSelectedRows-&gt;GetAt(<font color="#ff0000">nRow</font>);</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; m_wndReport.RemoveRecordEx(pRow-&gt;GetRecord());</div><div style="line-height: 16.8px;">&nbsp; &nbsp; }</div><div style="line-height: 16.8px;">}<span style="line-height: 1.4;"></pre></td></tr></table><br><br>next code is correct<table width="99%"><tr><td><pre class="BBcode"></span>void CTestNotificationsDlg::OnRemoveRowEx()</div><div style="line-height: 16.8px;">{</div><div style="line-height: 16.8px;">&nbsp; &nbsp; CXTPReportSelectedRows *pSelectedRows = m_wndReport.GetSelectedRows();</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">&nbsp; &nbsp; while (<font color="#00cc00">pSelectedRows-&gt;GetCount() &gt; 0</font>)</div><div style="line-height: 16.8px;">&nbsp; &nbsp; {</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; m_wndReport.RemoveRowEx(pSelectedRows-&gt;GetAt(<font color="#00cc00">pSelectedRows-&gt;GetCount() - 1</font>));</div><div style="line-height: 16.8px;">&nbsp; &nbsp; }</div><div style="line-height: 16.8px;">}</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">void CTestNotificationsDlg::OnRemoveRecordEx()</div><div style="line-height: 16.8px;">{</div><div style="line-height: 16.8px;">&nbsp; &nbsp; CXTPReportSelectedRows *pSelectedRows = m_wndReport.GetSelectedRows();</div><div style="line-height: 16.8px;"><br></div><div style="line-height: 16.8px;">&nbsp; &nbsp; while (<font color="#00cc00">pSelectedRows-&gt;GetCount() &gt; 0</font>)</div><div style="line-height: 16.8px;">&nbsp; &nbsp; {</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow *pRow = pSelectedRows-&gt;GetAt(<font color="#00cc00">pSelectedRows-&gt;GetCount() - 1</font>);</div><div style="line-height: 16.8px;">&nbsp; &nbsp; &nbsp; &nbsp; m_wndReport.RemoveRecordEx(pRow-&gt;GetRecord());</div><div style="line-height: 16.8px;">&nbsp; &nbsp; }</div><div style="line-height: 16.8px;">}<span style="line-height: 1.4;"></pre></td></tr></table></span></div>]]>
   </description>
   <pubDate>Wed, 24 Aug 2016 12:08:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75003&amp;title=solved-report-control-crash-on-removing-selected#75003</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Report Control crash on removing selected : Hello jmarcosf,I think we fixed...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75002&amp;title=solved-report-control-crash-on-removing-selected#75002</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23109<br /><strong>Posted:</strong> 24 August 2016 at 11:52am<br /><br />Hello jmarcosf,<br><br>I think we fixed this recently. Please check this with next beta or release.<br><br>Problem was in method&nbsp;CXTPReportSection::RefreshIndexes(int nIndexStart). Code with using variable&nbsp;<b>bSelected</b> should be removed (include <b>if</b> blocks). It is for properly selection with pressed Ctrl button. And to make proper indexes refreshing on removing rows we add new &nbsp;method&nbsp;<span style="font-family: &quot;Courier New&quot;, Courier, mono; line-height: 16.8px; : rgb248, 248, 252;">OnDeletedRefreshIndexes</span><span style="line-height: 1.4;"><table width="99%"><tr><td><pre class="BBcode">void CXTPReportSection::OnDeletedRefreshIndexes()</span><br><div>{</div><div>&nbsp; &nbsp; int nRowCount = m_pRows-&gt;GetCount();</div><div><br></div><div>&nbsp; &nbsp; for (int nIndex = 0; nIndex&lt;nRowCount; nIndex++)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow *pRow = NULL;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (m_pRows-&gt;m_pVirtualRow)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow = m_pRows-&gt;m_pVirtualRow;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow-&gt;m_nIndex = nIndex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Direct access to increase performance</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow = m_pRows-&gt;m_arrRows.m_pData&#091;nIndex&#093;;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL != pRow)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOOL bSelected = GetSelectedRows()-&gt;Contains(pRow);</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bSelected)</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetSelectedRows()-&gt;Remove(pRow);</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow-&gt;m_nIndex = nIndex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASSERT(pRow-&gt;IsVisible());</div><div><font color="#003399"><br></font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bSelected)</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetSelectedRows()-&gt;Add(pRow);</font></div><div><font color="#0033ff">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font></div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div>}<br><div>void CXTPReportSection::RefreshIndexes(int nIndexStart)</div><div>{</div><div>&nbsp; &nbsp; int nRowCount = m_pRows-&gt;GetCount();</div><div>&nbsp; &nbsp; nIndexStart = nIndexStart &lt; 0 ? 0 : nIndexStart;</div><div><br></div><div>&nbsp; &nbsp; for (int nIndex=nIndexStart; nIndex&lt;nRowCount; nIndex++)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow *pRow = NULL;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (m_pRows-&gt;m_pVirtualRow)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow = m_pRows-&gt;m_pVirtualRow;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow-&gt;m_nIndex = nIndex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Direct access to increase performance</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow = m_pRows-&gt;m_arrRows.m_pData&#091;nIndex&#093;;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL != pRow)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pRow-&gt;m_nIndex = nIndex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASSERT(pRow-&gt;IsVisible());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div>}</pre></td></tr></table> which like old&nbsp;<span style="line-height: 16.8px;">RefreshIndexes(). &nbsp; And then in&nbsp;</span>CXTPReportSection::RemoveRecordEx &nbsp;<span style="line-height: 16.8px;">RefreshIndexes() should be replaced with &nbsp;</span>OnDeletedRefreshIndexes().<br><br>Regards,<br>&nbsp;Oleksandr Lebed]]>
   </description>
   <pubDate>Wed, 24 Aug 2016 11:52:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75002&amp;title=solved-report-control-crash-on-removing-selected#75002</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] Report Control crash on removing selected : I think I&amp;#039;ve found a bug...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75001&amp;title=solved-report-control-crash-on-removing-selected#75001</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2121">jmarcosf</a><br /><strong>Subject:</strong> 23109<br /><strong>Posted:</strong> 24 August 2016 at 10:48am<br /><br />I think I've found a bug on Report Control.<br>On a Report Control, if you select several items and then you want to delete them you get a malfunctioning behaviour. Using RemoveRowEx() method will not remove all of selected rows and if you use RemoveRecordEx() application will crash.<br><br>This can be viewed using ReportControl.ReportSample sample as following:<br>Step 1- Select REPORT CONTROL menu item, then select "Quality Assurance-&gt;Notifications".<br>Step 2- Select Item 0, 0 to item 19,0.<br>Step 3- Press Remove Row Ex button. Only a few rows will be deleted.<br>Step 4- After restarting the application and selecting the same groups of rows but this time you press Remove Record Ex button application will crash.<br>]]>
   </description>
   <pubDate>Wed, 24 Aug 2016 10:48:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23109&amp;PID=75001&amp;title=solved-report-control-crash-on-removing-selected#75001</guid>
  </item> 
 </channel>
</rss>