Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - DropRecords from one RC to another
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DropRecords from one RC to another

 Post Reply Post Reply
Author
Message
John31 View Drop Down
Groupie
Groupie
Avatar

Joined: 08 December 2005
Location: United States
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote John31 Quote  Post ReplyReply Direct Link To This Post Topic: DropRecords from one RC to another
    Posted: 19 April 2006 at 4:09pm

Is there a sample available that shows how to modify the records being dropped into a report control?  I am aware of the existing sample using Ole and List boxes.

Take the following:

2 Report Controls, RC1 and RC2 with different columns.

Drag rows from RC1 to RC2.

In the DropRecords event of RC2 the records need to be adjusted to appear in the correct columns of RC2. The code below shows how I think you would do it.  However, the step in bold appears to do nothing.  What am I doing wrong?

 

' create a new records collection that will be populated with converted data and then
    ' replace the records passed in the event
    Set oRecords = RC2.CreateRecords
   
    If m_bDragFromRC1 Then
        m_bDragFromRC1 = False
        For i = 0 To Records.Count - 1
             ' get a ref to the old object
             Set oRec = Records(i)
             ' create a new record
             Set oNewRec = oRecords.Add
             oNewRec.AddItem ""
             oNewRec.AddItem("").Icon = ID_DSS
             oNewRec.AddItem GetFirstL(oRec(COL_USER_NAME).Value)
             oNewRec.AddItem oRec(COL_USER_DEPT).Value
             oNewRec.AddItem oRec(COL_USER_EXT).Value
             oNewRec.AddItem "Extension"
        Next i
       
        ' replace with the new collection
        Set Records = oRecords
    End If

Regards

John Layton
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.156 seconds.