Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Report Control: row number limits?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control: row number limits?

 Post Reply Post Reply
Author
Message
Russ View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2003
Location: Russian Federation
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Russ Quote  Post ReplyReply Direct Link To This Post Topic: Report Control: row number limits?
    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?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2005 at 11:12am
It was fixed in 9.60. Right, limit was 36000.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Russ View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2003
Location: Russian Federation
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Russ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Russ View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2003
Location: Russian Federation
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Russ Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 2005 at 12:31pm
Thank you, Oleg
your reply is highly appreciated! (как обычно :)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.062 seconds.