Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Virtual mode & Children records
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Virtual mode & Children records

 Post Reply Post Reply
Author
Message
tjohnson View Drop Down
Newbie
Newbie
Avatar

Joined: 20 July 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote tjohnson Quote  Post ReplyReply Direct Link To This Post Topic: Virtual mode & Children records
    Posted: 12 October 2005 at 10:35am

I've written two different implementations of the same, simple CXTPReportView class.  The ReportControl is set up to be a simple one column table where each row is allowed to have multiple children.  For example, the parent record might have the text "Cheese, cheddar" and the children would be "1 ounce, 1 cup, 1 bag, etc." This single column is set to be a tree column.

The first implementation builds the report all in to memory during the OnCreate method and then calls Populate.  As expected, the rows appear with the + icon next to them and expand/collapse appropriately.

The second implementation uses the virtual mode of the control.  I've implemented two "virtual" record classes (parent and child), each with their separate GetItemMetrics implementations.  I have tried many variations of instantiating the children records (in the constructor of the parent, in the GetItemMetrics method of the parent), but nothing seems to cause them to draw when Populate is called on the control.  The best I've been able to manage is to get the text of the parent record to be indented correctly, but a + never appears, despite the fact that the individual record objects do have children records attached to them (verified through inspection during debugging).  It seems nothing ever even tries to process the children records, despite their presence.

Looking through the code,  it appears that the Populate method takes a drastically, yet apparently inequivalent, approach to drawing the table in virtual mode.  While this difference is not unexpected, the fact that the they don't produce the same results is.  Am I missing something obvious in constructing the report in virtual mode to achieve the tree behavior? What is the trick?

Any help would be appreciated, because the in-memory version is unacceptable with the large data set that backs this control.

 

~Travis
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2005 at 11:57pm
Visrtual Mode don't support tree behavior.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
PierreL View Drop Down
Groupie
Groupie
Avatar

Joined: 01 September 2006
Location: Canada
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote PierreL Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2006 at 3:06pm
Are there any plans for the virtual mode to support this tree behavior

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