ReportControl with two horizontal scrollbars ?
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=17379
Printed Date: 29 July 2024 at 8:13pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: ReportControl with two horizontal scrollbars ?
Posted By: pepsipela
Subject: ReportControl with two horizontal scrollbars ?
Date Posted: 05 October 2010 at 11:29am
Hi,
We need
to implement a grid that enables two groups of columns with separate horizontal scrollbars for each group of columns, allowing navigate independently by
each group of columns and to maintain the synchronism between the rows
of the two groups of columns.
Currently, we used two separate ReportControls (one for each group of columns with their corresponding horizontal scrollbar). A priori we have to synchronize vertical scrolling between the two controls, but when order rows or group columns of a left ReportControl, we
do not know how to maintain synchronism between the rows of the right ReportControl.
Exactly, we need to sort and group on the right ReportControl and keep the rows synchronized on the left ReportControl. I imagine that to achieve the above functionality must use one ReportControl, but:
1) It is possible to implement a horizontal Scrollbar for a ReportControl freezed columns ? 2) It is possible to implement a horizontal Splitter on a ReportControl to create two groups of columns ? 3) Other suggestions ... ?
Thanks,
|
Replies:
Posted By: Aaron
Date Posted: 05 October 2010 at 11:57am
Hi,
I don't understand why you would like two seperate "reports" Is it possible to upload small demo project. Maybe I understand what you are trying to accomplish...
Thanks
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: pepsipela
Date Posted: 05 October 2010 at 8:54pm
Hi,
I would like to use one ReportControl, but not how to get ...
I attach a drawing to try to clarify the problem explained in my first post :
The question is, how to accomplish the behavior of the attached drawing using ReportControls ?
Thanks
|
Posted By: Aaron
Date Posted: 06 October 2010 at 5:48am
Hi,
Two (horizontal) scrollbars in one RC isn't possible. You are able to use your own scrollbars but ReportControl supports only one scrollbar at a time. Of course you could do your own "scrolling" but the fact remains you aren't able to scroll inside freezed columns. To get this working you could make columns invisible but that is going to be major task to: and keep track of visible columns and FreezeColumnsDivider position.
I guess you get stuck with the two ReportControls (I guess you use DockingPane control to resize the two ReportControls and have a visual splitter?) and do your "synchronisation" (whatever that means? I would love to see that in action in a small sample project )
Good luck
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: pepsipela
Date Posted: 07 October 2010 at 7:26am
Posted By: pepsipela
Date Posted: 07 October 2010 at 10:42am
Hi,
Here are two actual cases of our application. The first case is solved with a ReportControl and Freezed Columns, the second case is the problem explained and still have not solved ...
CASE 1 - When fewer columns are required in the left group of columns (1 to N), setting the FreezeColumnsCount property is sufficient.
The
columns of the left group (1 to N) are frozen and the horizontal scrollbar allows scrolling
through all the columns of the right group (A to Z)
CASE 2 - When a lot of columns are required in the left group of columns (1 to N), we need to scrolling horizontally in the left (1 to N) and right (A to Z) group of columns.
a) In this
case we are using two different ReportControl's under one container with a
horizontal splitter (the red line allows to dynamically resize the two groups of
columns). b) The left horizontal scrollbar allows scrolling
through all the columns of the left group (1 to N) and the right horizontal scrollbar allows scrolling
through all the columns of the right group (A to Z). c) The right vertical scrollbar allows scrolling
through all the common rows of the left and right ReportControl's.
The
problem appears to sort or group on the left ReportControl, at which point
we lose the correspondence with the rows of the right ReportControl (Aaron, this is what I call the "loss of synchronization" between the rows of left and right ReportControl's).
Other suggestions in this regard to solve the problem ... ?
Thanks
|
Posted By: pepsipela
Date Posted: 07 October 2010 at 12:04pm
Hi Oleg,
We are in development process and we need to take some important decisions related to this topic ...
If the ReportControl would allow the use of Splitter's we could easily solve the problem, it would be possible in future versions ? Is planned to implement the Splitter's in a ReportControl ?
Regards.
|
Posted By: Aaron
Date Posted: 07 October 2010 at 2:44pm
Hi,
Maybe I don't understand your requirements...
A record on the left RC and right RC belong together? Correct?
Yes: I guess you use SortingChanged and GroupOrderChangedEx event to "synchronize". I used these events to get the sorting and grouping on both RC's in uploaded project. Maybe it's enough but I think you need more functionality... Maybe SortPriority and GroupPriority will help you further to meet your requirements but then I need to know the WHY and HOW (see No below )
No: I still don't understand so here's test project and please add records to both RC's http://forum.codejock.com/uploads/3701/TestDualRC_V1.zip - uploads/3701/TestDualRC_V1.zip
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: Hemesh
Date Posted: 08 October 2010 at 4:41am
I think the idea of scrolling columns when certain columns are frozen makes sense. in the case you are looking at. I'm guessing you want it like excels window "splitter" which gives this effect. I'm not sure if it can be done in the report control and might need a specialist spread control like Farpoint's spread.
You can be achieved by using your own scrollbars with one report control and just turning on/off visible columns, but it's a bit of fiddling!
Good luck!
------------- Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit)
Language: Visual Basic 6.0
|
Posted By: pepsipela
Date Posted: 08 October 2010 at 11:49am
Hi Aaron,
Thank you very much for the interest and support we are offering ...
Aaron wrote:
Maybe I don't understand your requirements...
A record on the left RC and right RC belong together? Correct? |
Correct ... it is always the same record in both RC's, but the information displayed in each RC is different. Specifying : a) Rows are all the available materials to manufacture products b) Left RC columns shows the attributes needed to manage materials (code, description, family,. etc ...) c) Right RC columns shows all products to be manufactured d) Left RC is used to visualize and organize all the available materials e) Left RC is used to specify the materials needed in each product to be manufactured Conclusion, the row on the left RC provides the necessary information to make selections in the right RC rows
Aaron wrote:
Yes: I guess you use SortingChanged and GroupOrderChangedEx event to "synchronize". I used these events to get the sorting and grouping on both RC's in uploaded project. Maybe it's enough but I think you need more functionality... Maybe SortPriority and GroupPriority will help you further to meet your requirements but then I need to know the WHY and HOW (see No below )
No: I still don't understand so here's test project and please add records to both RC's http://forum.codejock.com/uploads/3701/TestDualRC_V1.zip - uploads/3701/TestDualRC_V1.zip |
Here's the test project with some small modifications and new records added : uploads/4173/TestDualRC_V2.zip - uploads/4173/TestDualRC_V2.zip
In terms of functionality required (if it was possible), we need to sort rows, move columns, grouping columns and filter data (these actions are performed in the left RC and right RC must automatically adapt to those changes).
Regards
|
Posted By: jpbro
Date Posted: 08 October 2010 at 4:11pm
Here's a start:
uploads/2676/TestDualRC_V2.zip - uploads/2676/TestDualRC_V2.zip
If I've understood your requirements correctly, this sample should help.
I don't have time to explain things completely, but check out the code and get back to me if you have any questions.
Essentially what I've done is:
- Use CJ scrollbars and attache them to the left RC so we have more control (only show the horizontal scrollbar)
- Use a hack (SetCustomDraw with MeasureRow) to know when the right RC scrollbar has been changed. This allows us to synchronize scrolling. Maybe there is a better way to do this, but I don't know if there is.
- Add all of the left RC columns to the right RC, but set them to be invisible. This makes it easy to synchronize sorting & grouping, at the expense of increasing memory usage.
- Prevent sorting, grouping, etc.. on the right RC to make things easier.
Hope this helps!
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: pepsipela
Date Posted: 08 October 2010 at 5:57pm
Hi jpbro,
Thank you very much for the new project and support we are offering ...
jpbro wrote:
Here's a start:
uploads/2676/TestDualRC_V2.zip - uploads/2676/TestDualRC_V2.zip
If I've understood your requirements correctly, this sample should help ... |
I will travel a few days, we test the project and next wednesday we will explain the experiences ...
Regards
|
Posted By: Aaron
Date Posted: 10 October 2010 at 5:35am
Hi,
I created same (well almost same ) test as Jason uploaded and came to conclusion that it doesn't work. "Synchronizing" Sorting and grouping and keeping the scrollbar in position (and a lot we didn't thing of yet ) to meet requirements.
As I said in one of my previous replies it's hard to get it done with just one RC, I have to say I was wrong I created test project and have only one RC and able to scroll in the "freezed columns area". So Sorting and Grouping won't cause any problems (only the ones which are "implemented" hehehe) This first attempt will help you to implement what you need...
http://forum.codejock.com/uploads/3701/TestRCDualScrollbar.zip - uploads/3701/TestRCDualScrollbar.zip
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: jpbro
Date Posted: 12 October 2010 at 7:11am
Nice one Aaron
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: pepsipela
Date Posted: 14 October 2010 at 4:32am
Aaron wrote:
As I said in one of my previous replies it's hard to get it done with just one RC, I have to say I was wrong I created test project and have only one RC and able to scroll in the "freezed columns area". So Sorting and Grouping won't cause any problems (only the ones which are "implemented" hehehe) This first attempt will help you to implement what you need... |
Thank you very much for VB6 test projects ...
I think this latest project with one RC will allow us to obtain the required specifications. We will work on this line and we will explain the obtained results ...
Regards,
|
|