Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Merge Cells in Child row manually is not possible?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Merge Cells in Child row manually is not possible?

 Post Reply Post Reply
Author
Message
chc_gpi View Drop Down
Newbie
Newbie


Joined: 06 October 2011
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote chc_gpi Quote  Post ReplyReply Direct Link To This Post Topic: Merge Cells in Child row manually is not possible?
    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


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: 04 November 2011 at 8:04am
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... Wink
 
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
 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.199 seconds.