Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Smooth vertical scrolling
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Smooth vertical scrolling

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

Joined: 21 January 2009
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote YMHiK Quote  Post ReplyReply Direct Link To This Post Topic: Smooth vertical scrolling
    Posted: 16 February 2009 at 5:41pm
Is there any way to enable smooth vertical scrolling for Report Control?

This may be dumb question, but currently I'm running into issue with report record being bigger in dimension than report control.
And from what I've seen report control displays only top portion of record.
Back to Top
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 3:36am
Welcome to the club... 
(https://forum.codejock.com/forum_posts.asp?TID=8862&KW=)
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 2:44am
I asked about this feature too... :(
Quote Main reason why it won't be changed is perfomance.


Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (1) Thanks(1)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2015 at 8:10pm
Any hope of improving the performance of Report Control "Vertical Smooth Scrolling"?

I set:

wndReport.SetScrollMode(xtpReportOrientationAll,xtpReportScrollModeSmooth);

My program became unstable/unusable (time out crash on populate) with a large dataset. I believe the problem has existed for a decade or so. Shocked

It would be nice to have a smooth vertical scroll since a column that exceeds the view area becomes inaccessible to the end user. This can be a pretty dramatic failure when the program runs in a dialog frame window or on a tiny tablet type computer.

Thanks for listening. I hope that the feature can be made usable.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2015 at 3:06pm
Hello Algae,

What version of ToolkitPro do you use?  Also write ActiveX or C++ version ?

Regards,
 Oleksandr Lebed
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2015 at 3:36pm
Hi Oleksandr,

Using:

Version 16.26 with the exception of XTPTreebase.cpp from 15.3.1 since there were too many problems with later revisions.

I've also tried versions 16.3.1 and 16.4.

Static build. C++.  Visual Studio 2010.

Honestly, I can see why it's slow. The source appears to do lots and lots of required rect computations. The more records there are the slower it gets. I did not try virtual mode since it doesn't support the "grouping" feature which I require.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2015 at 3:46pm
Algae, have you tried wndReport.GetPaintManager()->SetFixedRowHeight(TRUE) ?  
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2015 at 3:59pm
Sorry, no. I have not tried FixedRowHeight.

The row heights have to be variable for my purpose since record item content may vary widely from one record to another. For instance a "Note" item might consist of 1 line of text or > 20.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2015 at 5:59am
Hi Algae,

Do you use   wndReport.m_bFreeHeightMode = TRUE ?

(Sorry, I'm not having enough time to explore performance of Report Control now. But I remember about it  and sometimes I can notice some things.)
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2015 at 1:10pm
Hello olebed,

Thank you for looking at this.  I know you folks must be very busy working on new release.

Ordinarily I do not use  wndReport.m_bFreeHeightMode = TRUE. I use the default of FALSE.

I tested it briefly. It produced report control line items that did not adjust line height to the cell content properly. Word wrap failed to work. It proved unsuitable.

I'm not clear on what free height mode actually means though. CJ help says "Flag to set RC Free Height Mode" Wink

If the rows are fixed height, I can see how scroll performance would be improved since the bottleneck seems to be in refactoring row heights.

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2015 at 4:08pm
"Free Height Mode"  means that you can set height of rows to any value. And of course this will prevent to recalculation height of rows in redrawing.

Scrolling
 -> redraws Report
   -> recalcs height of rows
      ->calls GetRowHeightEx() 

CXTPReportPaintManager::GetRowHeightEx()  just  return  pRow->m_nFreeHeight  in free height mode. In other case method recalc height.

Yes, you need to properly calculate height of every record, but once. To do this you can use algorithm from CXTPReportControl::GetRowsHeight() method.
nRowsHeight += GetPaintManager()->GetRowHeight(&dc, pRows->GetAt(i), nTotalWidth);
change with
CXTPReportRow* pRow = pRows->GetAt(i);
if (pRow && pRow->GetRecord())
pRow->GetRecord()->m_nFreeHeight = GetPaintManager()->GetRowHeight(&dc, pRow, nTotalWidth);
to save properly height
  
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2016 at 5:35pm
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.140 seconds.