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
|