Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - ReportControl with two horizontal scrollbars ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl with two horizontal scrollbars ?

 Post Reply Post Reply
Author
Message
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl with two horizontal scrollbars ?
    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,

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

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2010 at 8:54pm
Hi,

I would like to use one ReportControl, but not how to get ... Confused

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

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

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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 Wink)
 
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....
Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Posted: 07 October 2010 at 7:26am
Hi,

Thank you very much for the suggestions ...

Originally posted by Aaron Aaron wrote:

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

One question, how to know the position of the
FreezeColumnsDivider in a ReportControl ?

Originally posted by Aaron Aaron wrote:

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 Wink)
 
This is a business project, currently do not have a small sample project ... Cry

However, soon I'll upload some real photos of the project which clearly shows the problem explained.

Thanks


Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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 Wink)    

No: I still don't understand Ouch so here's test project and please add records to both RC's  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....
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2010 at 11:49am
Hi Aaron,

Thank you very much for the interest and support we are offering ... Handshake

Originally posted by Aaron 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

Originally posted by Aaron 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 Wink)    

No: I still don't understand Ouch so here's test project and please add records to both RC's  uploads/3701/TestDualRC_V1.zip


Here's the test project with some small modifications and new records added : 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


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

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2010 at 4:11pm
Here's a start:

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:

  1. Use CJ scrollbars and attache them to the left RC so we have more control (only show the horizontal scrollbar)
  2. 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.
  3. 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.
  4. 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

Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2010 at 5:57pm
Hi jpbro,

Thank you very much for the new project and support we are offering ... Handshake

Originally posted by jpbro jpbro wrote:

Here's a start:

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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2010 at 5:35am
Hi,
 
I created same (well almost same Wink) 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 Wink) 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 Embarrassed 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...
 
 
 
 
 
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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2010 at 7:11am
Nice one Aaron Thumbs Up
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
pepsipela View Drop Down
Groupie
Groupie


Joined: 15 May 2008
Location: Spain
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote pepsipela Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2010 at 4:32am
Originally posted by Aaron 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 Embarrassed 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 ... Smile

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 ... Wink

Regards,

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.172 seconds.