Print Page | Close Window

Smooth vertical scrolling

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13423
Printed Date: 26 September 2024 at 1:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Smooth vertical scrolling
Posted By: YMHiK
Subject: Smooth vertical scrolling
Date 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.



Replies:
Posted By: Michl
Date Posted: 23 February 2009 at 3:36am
Welcome to the club... 
(https://forum.codejock.com/forum_posts.asp?TID=8862&KW=)


Posted By: zitz
Date Posted: 28 February 2009 at 2:44am
I asked about this feature too... :(
Quote Main reason why it won't be changed is perfomance.




Posted By: Algae
Date 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.


Posted By: olebed
Date 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


Posted By: Algae
Date 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.


Posted By: olebed
Date Posted: 21 July 2015 at 3:46pm
Algae, have you tried wndReport.GetPaintManager()->SetFixedRowHeight(TRUE) ?  


Posted By: Algae
Date 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.


Posted By: olebed
Date 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.)


Posted By: Algae
Date 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.



Posted By: olebed
Date 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
  


Posted By: olebed
Date Posted: 30 June 2016 at 5:35pm
http://forum.codejock.com/forum_posts.asp?TID=23068" rel="nofollow - improvement of virtual mode performance



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