Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - ComMergeItems in ReportControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ComMergeItems in ReportControl

 Post Reply Post Reply
Author
Message
Andy121070 View Drop Down
Groupie
Groupie


Joined: 01 December 2010
Location: UK
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy121070 Quote  Post ReplyReply Direct Link To This Post Topic: ComMergeItems in ReportControl
    Posted: 22 March 2017 at 1:53pm
We are trying to create a tree list in the report control which contains 3 columns.  For some rows, there may be child items which we want to display in as below.  We have tried using ComMergeItems to merge the child items but getting an access violation error.

Any help on what the ComMergeItems parameters are expected to be; handles, column index, or something else?

The tree is to look like...

Column A Column B Column C
 Item_A Value_A Price_A
 Item_B Value_B Price_B
+Item_C Value_C Price_C
   Sub Item text for C1
   Sub item text for C2
 Item_D Value_D Price_D
+Item_E Value_E Price_E
   Sub Item text for E

Note that the sub item text is spanning the columns.  I can get the data to show in all but the spanning of the sub items.

Any assistance appreciated.
Regards

Andy
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2017 at 5:39am
Hello Andy,

You again start topic about ActiveX  in MFC branch :-)

you can find documentation abour MergeItems method in 
c:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v17.3.0\Help\SymbolReference.chm

MergeItems Method

Description

Merges 2 or more items in the report.

Syntax

Public Sub MergeItems( _
   ByVal RecordFrom As Long, _
   ByVal RecordTo As Long, _
   ByVal ColumnFrom As Long, _
   ByVal ColumnTo As Long _
) 

Parameters

RecordFrom
Index of the record to start the merge.  Will be the same as RecordTo if merging cells horizontally.
RecordTo
Index of the record to end the merge. Will be the same as RecordFrom if merging cells horizontally.
ColumnFrom
Index of the column to start the merge.  Will be the same as ColumnTo if merging cells vertically.
ColumnTo
Index of the column to end the merge. Will be the same as ColumnFrom if merging cells vertically.

Remarks

MergeItems allows cells in the report to be merged both vertically and horizontally.  

example in c:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v17.3.0\Samples\ReportControl\VB\ReportSample\Merge.frm

    wndReportControl.PaintManager.AllowMergeCells = True
    wndReportControl.Records.MergeItems 0, 0, COLUMN_VS6, COLUMN_VS2010

Example of TreeView in ReportControl you can see in the same ReportSample - frmTreeView.frm

Regards,
 Oleksandr Lebed

Back to Top
Andy121070 View Drop Down
Groupie
Groupie


Joined: 01 December 2010
Location: UK
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy121070 Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2017 at 7:44am
Thank you for the feedback.  Apologies for the wrong forum, again!!!

We have tried to use the commands as you show in your example above, but our application blows up when we do the MergeItems call.

What are the arguments relating to?  Objects, Columns, Pointers, etc?

This may be a stupid question but whatever we use it goes bang.
Regards

Andy
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2017 at 8:27am
arguments are indexes of rows and columns
Public Sub MergeItems( ByVal RecordFrom As Long, ByVal RecordTo As Long, ByVal ColumnFrom As Long, ByVal ColumnTo As Long )

Method MergeItems doesn't check are input indexes correct. You should check it before call 
MergeItems()
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.172 seconds.