<?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 : CXTPReportControl::GetReportAreaRows: wrong result</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : CXTPReportControl::GetReportAreaRows: wrong result]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 03 Jun 2026 18:22:54 +0000</pubDate>
  <lastBuildDate>Wed, 25 Oct 2023 11:31:45 +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=19839</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[CXTPReportControl::GetReportAreaRows: wrong result : FYI to duplicate the bug in GetReportAreaRows()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78808&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78808</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1284">franji1</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 25 October 2023 at 11:31am<br /><br />FYI to duplicate the bug in GetReportAreaRows() (or the bug could be in&nbsp;<span style="font-family: &quot;Courier New&quot;, Courier, mono; : rgb248, 248, 252;">OnGetItemsCaptionMaxWidth</span>, depending upon if GetReportAreaRows() behavior is actually "correct"),<div>stick the widest data (by far) in the last row of your RC in one of the columns.<div><br></div><div>View your RC with the last row NOT visible.&nbsp; <strike>Resize</strike>&nbsp;Autosize the column, and it works correctly.&nbsp; Scroll down so that this last row is visible.&nbsp; <strike>Resize </strike>&nbsp;Autosize that column again and it does not take into account the width of that last row.</div><div><div><br></div><div>It may only be an issue in virtual mode (the <strike>resize </strike>&nbsp;autosize behavior, not the GetReportAreaRows issue)</div></div></div>]]>
   </description>
   <pubDate>Wed, 25 Oct 2023 11:31:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78808&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78808</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPReportControl::GetReportAreaRows: wrong result : I &amp;#034;overrode&amp;#034; OnGetItemsCaptionMaxWidthint...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78807&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78807</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1284">franji1</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 25 October 2023 at 11:22am<br /><br />I "overrode" OnGetItemsCaptionMaxWidth<div><br></div><div><div><font face="Courier New, Courier, mono">int CMemViewReportCtrl::OnGetItemsCaptionMaxWidth(CDC* pDC, CXTPReportRows* pRows, CXTPReportColumn* pColumn, int nStartRow /* = 0 */, int nRowsCount /* = -1 */)</font></div></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>{</font></span></div></div><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>// OBOB in XTP in reporting # of visible rows (in virtual mode???)</font></span></div></div><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>if ((nRowsCount &gt;= 0) /* &amp;&amp; IsVirtualMode()*/ &amp;&amp; (nStartRow &gt;= 0))</font></span></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">		</span>{</font></span></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">		</span>// if I have 10 rows 0..9, the row count is still 10, not 9!</font></span></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">		</span>if (nRowsCount == (GetRows()-&gt;GetCount() - nStartRow - 1))</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">			</span>{</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">			</span>//HASSERT(false);</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">			</span>nRowsCount++;</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">			</span>}</font></span></div></div></blockquote></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">		</span>}</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>const int nWidth = BASE_CLASS::OnGetItemsCaptionMaxWidth(pDC, pRows, pColumn, nStartRow, nRowsCount);</font></span></div></div><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>return nWidth;</font></span></div></div><div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>}</font></span></div></div></blockquote><div><br></div>]]>
   </description>
   <pubDate>Wed, 25 Oct 2023 11:22:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78807&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78807</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPReportControl::GetReportAreaRows: wrong result : The code (GetReportAreaRows) appears...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78806&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78806</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1284">franji1</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 25 October 2023 at 10:55am<br /><br />The code (<span style="font-family: &quot;Courier New&quot;, Courier, mono; : rgb248, 248, 252;">GetReportAreaRows</span>) appears to still be busted in 20.x<div><br></div><div>Maybe I do not understand what this method is supposed to do (why all that work without doing anything with it?)</div>]]>
   </description>
   <pubDate>Wed, 25 Oct 2023 10:55:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78806&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78806</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPReportControl::GetReportAreaRows: wrong result : I just saw thatCXTPReportContr...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78805&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78805</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1284">franji1</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 25 October 2023 at 10:34am<br /><br />I just saw that&nbsp;CXTPReportControl::OnGetItemsCaptionMaxWidth is virtual.&nbsp; I can override it and fix it that way.<div><br></div><div>EDIT 13.3</div><div><div><font face="Courier New, Courier, mono">int CXTPReportControl::GetReportAreaRows(int nStartRow, BOOL bMoveDown)</font></div><div><font face="Courier New, Courier, mono">{</font></div><div><font face="Courier New, Courier, mono">...</font></div><div><font face="Courier New, Courier, mono"><span style="white-space: pre;">	</span>//return bMoveDown ? m_pRows-&gt;GetCount() - nStartRow : nStartRow;</font></div><div><span style="white-space: normal;"><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>return bMoveDown ? m_pRows-&gt;GetCount() - nStartRow - 1: nStartRow; //-this is better way!</font></span></div><div><font face="Courier New, Courier, mono">}</font></div></div><div><br></div><div>The code looks WRONG.&nbsp; It does all this work to determine what is the last row (in the local var i), yet the return statement does not take into account any of that work (the commented out return is theirs).</div><div><br></div><div>There should be an i in the return statement somewhere???</div>]]>
   </description>
   <pubDate>Wed, 25 Oct 2023 10:34:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78805&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78805</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPReportControl::GetReportAreaRows: wrong result : (13.2.1) I just saw this behavior...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78804&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78804</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1284">franji1</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 25 October 2023 at 10:01am<br /><br />(13.2.1)&nbsp; I just saw this behavior in my implementation of a "Best Fit All" on my virtual report control.&nbsp; If the last displayable row is the "widest" for a column, the Best Fit clips it (next "widest" is much narrower).&nbsp; If I scroll down so that another (yet narrower) row is in the viewport for the control, the "Best Fit All" works as expected!<div><div><br></div><div>11 years later - not too late&nbsp;<img src="http://forum.codejock.com/smileys/smiley42.gif" border="0" alt="Handshake" title="Handshake" /></div></div><div><br></div><div>I've been trying to fix it - thought it was in my code!</div>]]>
   </description>
   <pubDate>Wed, 25 Oct 2023 10:01:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=78804&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#78804</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPReportControl::GetReportAreaRows: wrong result :    Hi,I have some trouble to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=68393&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#68393</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1107">leo_12</a><br /><strong>Subject:</strong> 19839<br /><strong>Posted:</strong> 05 June 2012 at 8:18am<br /><br /><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Hi,</font><div>&nbsp;</div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I have some trouble to get the best fit column width of the tree column in an virtual mode ReportControl. </font></div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font>&nbsp;</div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif">As documentation says, CXTPReportControl::GetReportAreaRows should return the number of currently visible rows between nStartRow and the bottom of the current view.</font></div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font>&nbsp;</div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif">In my case I have 2 rows in large view so they are all visible. The function returns 1. Should the nStartRow be included in the result or not?</font></div><div><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font>&nbsp;</div><div><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2">If not, then in CXTPReportControl::<font color="#020002"><font color="#020002">OnGetColumnDataBestFitWidth the result of GetReportAreaRows in the local variable nVisibleRows should be&nbsp;incremented by 1. Otherwise the width of the last item is not considered in the calculation of the width.</font></font></font></font></div><div><font color="#020002" size="2"><font color="#020002" size="2"><font color="#020002" size="2"><div></div></font><div></div><p><font face="Verdana, Arial, Helvetica, sans-serif"><font color="#020002" size="2"><font color="#020002" size="2"></font></font></font></p><font color="#020002" size="2"><font color="#020002" size="2"></font></font></font></font></div>]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 08:18:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19839&amp;PID=68393&amp;title=cxtpreportcontrolgetreportarearows-wrong-result#68393</guid>
  </item> 
 </channel>
</rss>