Print Page | Close Window

Report Control: row number limits?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2199
Printed Date: 08 November 2025 at 12:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Report Control: row number limits?
Posted By: Russ
Subject: Report Control: row number limits?
Date Posted: 09 May 2005 at 2:48am
I just looked at the Report control sample provided with v9.51. If you change OnInitDialog in the PerfomanceTestDlg.cpp to add 100000 instead of just 1000 you'll have no luck scrolling list down to the last item. The code crashes after you get behind 30000 (approx) records.

are there any hardcoded limits on the number of rows a control can contain?



Replies:
Posted By: Oleg
Date Posted: 09 May 2005 at 11:12am
It was fixed in 9.60. Right, limit was 36000.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Russ
Date Posted: 09 May 2005 at 1:21pm
can I have a patch - just to fix this bug? I do not need any extra features, just the control that works


Posted By: Oleg
Date Posted: 09 May 2005 at 4:03pm

Replace this member:

void CXTPReportControl::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
 if (pScrollBar != NULL)
 {
  CWnd::OnVScroll(nSBCode, nPos, pScrollBar);
  return;
 }
 int nCurPos = m_nTopRow;

 // decide what to do for each diffrent scroll event
 switch(nSBCode)
 {
  case SB_TOP: nCurPos = 0; break;
  case SB_BOTTOM: nCurPos = GetScrollLimit(SB_VERT); break;
  case SB_LINEUP: nCurPos = max(nCurPos - 1, 0); break;
  case SB_LINEDOWN: nCurPos = min(nCurPos + 1, GetScrollLimit(SB_VERT)); break;

  case SB_PAGEUP: nCurPos = max(nCurPos - GetReportAreaRows(nCurPos, false), 0); break;
  case SB_PAGEDOWN: nCurPos = min(nCurPos + GetReportAreaRows(nCurPos, true), GetScrollLimit(SB_VERT)); break;

  case SB_THUMBTRACK:
  case SB_THUMBPOSITION:
   {
    SCROLLINFO si;
    ZeroMemory(&si, sizeof(SCROLLINFO));
    si.cbSize = sizeof(SCROLLINFO);
    si.fMask = SIF_TRACKPOS;

    if (!GetScrollInfo(SB_VERT, &si) )
     return;
    nCurPos = si.nTrackPos;
   }
   break;
 }

 SetTopRow(nCurPos);

 CWnd::OnVScroll(nSBCode, nPos, pScrollBar);
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Russ
Date Posted: 10 May 2005 at 12:31pm
Thank you, Oleg
your reply is highly appreciated! (как обычно :)



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