Merge Cells in Child row manually is not possible? |
Post Reply |
Author | |
chc_gpi
Newbie Joined: 06 October 2011 Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 20 October 2011 at 5:05am |
Hi,
I use CodeJock Xtreme SuitePro (ActiveX) 15.1.3 - Report Control. When i try to merge cells in a Child row, i have an error -2147417848 ( 80010108 ) on Records.MergeItems. It seems merging cells on child is not possible. But if i don't create child, just simple records, merge column 1 & 2 on line 0, and sort by dragging column 0, the result is there : ! CodeJock can do it ! Anyone have a idea, please ? How can i do ? Thanks for any help, it's very important for our app ! My code : Option Explicit Private Sub Form_Load() Dim Column As ReportColumn Set Column = wndReportControl.Columns.Add(0, "Zero", 40, True) ' Manual Treeview Column.TreeColumn = True Set Column = wndReportControl.Columns.Add(1, "Un", 40, True) Set Column = wndReportControl.Columns.Add(2, "Deux", 40, True) Set Column = wndReportControl.Columns.Add(3, "Trois", 40, True) wndReportControl.PaintManager.HorizontalGridStyle = xtpGridSolid wndReportControl.PaintManager.VerticalGridStyle = xtpGridSolid wndReportControl.PaintManager.GridLineColor = &H80000012 wndReportControl.PaintManager.AllowMergeCells = True Dim Record As ReportRecord Dim RecordPere As ReportRecord Set RecordPere = wndReportControl.Records.Add() RecordPere.AddItem "Texte Ligne 0 Colonne 0" RecordPere.AddItem "Texte Ligne 0 Colonne 1" RecordPere.AddItem "Texte Ligne 0 Colonne 2" RecordPere.AddItem "Texte Ligne 0 Colonne 3" wndReportControl.Records.MergeItems 0, 0, 1, 2 ' Manual Treeview Set Record = RecordPere.Childs.Add ' Auto Treeview ' Set Record = wndReportControl.Records.Add() Record.AddItem "Texte Ligne 1 Colonne 0" Record.AddItem "Texte Ligne 1 Colonne 1" Record.AddItem "Texte Ligne 1 Colonne 2" Record.AddItem "Texte Ligne 1 Colonne 3" wndReportControl.Records.MergeItems 1, 1, 1, 2 ' Auto Treeview ' wndReportControl.GroupsOrder.Add wndReportControl.Columns(0) ' wndReportControl.GroupsOrder(0).SortAscending = True wndReportControl.Populate wndReportControl.Redraw End Sub |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
A child 'record' isn't really a record at least not in the wndReportControl.Records collection.
wndReportControl.Populate
wndReportControl.Redraw Debug.Print Me.wndReportControl.Records.Count 'Will be 1 If you need a child to be merged you have to address the childs of a particular record of the .Records collecion.
[...]
' Manual Treeview
Set Record = RecordPere.Childs.Add ' Auto Treeview ' Set Record = wndReportControl.Records.Add() Record.AddItem "Texte Ligne 1 Colonne 0" Record.AddItem "Texte Ligne 1 Colonne 1" Record.AddItem "Texte Ligne 1 Colonne 2" Record.AddItem "Texte Ligne 1 Colonne 3" 'In this case Records(0) is the only record in collection and you need to merge the childs of this record
wndReportControl.Records(0).Childs.MergeItems 0, 0, 1, 2 wndReportControl.Populate wndReportControl.Redraw Debug.Print Me.wndReportControl.Records.Count Debug.Print Me.wndReportControl.Records(0).Childs.Count Hope this helps...
|
|
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.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |