Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SOLVED: Virtual mode with hierarchical data
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Virtual mode with hierarchical data

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

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Virtual mode with hierarchical data
    Posted: 10 August 2009 at 12:56pm

Hi,

    I'm trying to use the report control in virtual mode with hierarchical data. I've been investigating the use of "VirtualRowLevel" and "VirtualRowFlags" properties of "Metrics" object in "OnBeforeDrawRow" event.

    Everything goes fine if I load a one-level tree:

    1
    |
    +- 2
    |
    +- 3
    |  
    4
    |
    5

    But I cannot get right result when trying to load a multilevel one:

    1
    |
    +- 2
    |  |
    |  +- 3
    |
    +- 4
    |
    5

    Is there any way to show a multilevel tree using virtual mode to get this right result? (It seems the control ignore the property "VirtualRowLevel" when > 1).

    Kind regards,


FJSen

Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2009 at 6:41am
Hi! Any help? Codejock Support?
 
Regards,
 
FJSen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 2:50pm

    Hi,

    I've tested it with 13.2 beta release at https://forum.codejock.com/uploads/BetaOCX/ReportControlBeta13-2.rar and it seems to semi-work. I expect the following result:

    1
    |
    +- 2
    |  |
    |  +- 3
    |
    +- 4
    |
    5

    but i get this result:

    1
    |
    +- 2
       |
       +- 3
    |
    +- 4
    |
    5

    All that I need to get the rigth result is to have any property or method in the ReportRecordItemMetrics object (at OnBeforeDrawRaw handler) to let me to say which "Virtual row levels" have to draw a vertical line in the current "virtual" record. Perhaps one call to this method or property per vertical line to draw indicating the level (0 >= Level < VirtualRowLevel). With this simple solution the Report control will provide a full hierarchical virtual mode support.

    Also, I'd like to upload an image to describe the problem. I've read that administrators must allow that ;-)


    Kind regards,

FJSen

Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 3:28pm
Ok - I appreciate you try my recent modifications which release prev restricted for one level deep childs. Please give me more details about the way current record can give you enough information about child hierarchy. We can draw everything but that's is behind this?
 
btw - You will ab le to upload images after you make enough posts - this is formal auto rule.
I recommend you to open Issue and we can communicate faster and you will upload all you want - images, docs, codes
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 4:06pm

Hi MDoubson,

    When we work in virtual mode, the hosting app is responsible to give information to the control to draw the hierarchy. The only ways the control now accepts this information are (I'm talking about OnBeforeDrawRaw handler) :

1- "VirtualRowLevel" property of recordItemMetrics object
    Here we can tell to the control the depth of the item.

2- "VirtualRowFlags" property of recordItemMetrics object
    Here we can tell to the control if the record has children and if it is the last child.

3- "Expanded" property of row object
     We can tell to the control if the record is expanded or not.

    So, we also need any method or property where we can tell to the control if are there any "uncles" of the item, that will be drawn later but whose parents are drawn yet (the 4th record in my example. I'd need something like this:

    recordItemMetrics->MarkVirtualRowLevelToDrawHiearchyLine(x);   // x = 0 in my example when row = 3

    Where 0 <= x < VirtualRowLevel of the current item.


    With this info, the control must draw a vertical line at indent 0 but not at indent 1, when in 3rd row.

    If we'd have a more complex hierarchy, perhaps we'd need to draw several vertical lines (with several call to the new method):

    1
    |
    +- 2
    |  |
    |  +- 3
    |     |
    |     +- 4
    |     |  |
    |     |  +- 5
    |     |
    |     +- 6
    |
    +- 7
    |
    8

    When we are at OnBeforeDrawRaw of raw 5, we need to perform two calls to the new method to tell the control to draw two additional lines at indents 0 and 2:


    recordItemMetrics->VirtualRowLevel= 4;
    recordItemMetrics->MarkVirtualRowLevelToDrawHiearchyLine(0);
    recordItemMetrics->MarkVirtualRowLevelToDrawHiearchyLine(2);

    I expect this explanation can clarify the problem.

    Kind regards,

FJSen

Note: I've opened an issue one week ago but nobody responds for the last 4 or 5 days. I think this method is better because more people can participate and give another points of view. Thanks.

Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 4:16pm
In term of discussion - may be, in term of some results - no.
Something strange happened - I worked with your issue - after it was reassigned to other person - now I assign it back and will work with you don't worry.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2009 at 11:56am

This snapshot show how current version support multi-levels vitrualmode - see updated https://forum.codejock.com/uploads/DemoVersion/EditVirtualListIconStatic.rar
 
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 01 September 2009 at 4:07pm
Hi Mark,
 
    ¡This seems to solve the problem! Once I've test it on my holidays return, I will rename the post to "SOLVED: ..."
 
    Kind regards,
 
FJSen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
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.187 seconds.