Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How to insert record in a specific position
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to insert record in a specific position

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


Joined: 09 March 2007
Location: Italy
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote sosepe Quote  Post ReplyReply Direct Link To This Post Topic: How to insert record in a specific position
    Posted: 01 March 2012 at 5:29am
Hello, it's possible to insert a new record in a specific position?

Example:
i have a reportcontrol with 3 records:
rec1
rec2
rec3

how to insert a new record between rec2 and rec3 withouth delete all records and reinsert all?

rec1
rec2
new record
rec3

Many Many thanks!!

I hade CodeJock v15.1.3.0908


Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2012 at 7:05am
from the provided help file:

Insert Method

Description
Inserts a new record\row at the specified position in the collection of records

Syntax
Public Function Insert(  ByVal Index As Long ) As ReportRecord

Parameters
Index The position in the collection of records to insert this record.


    Dim Record As ReportRecord
    Dim Item   As ReportRecordItem

    'Inserts a new Record\Row in the 3th row of the ReportControl
    Set Record = wndReportControl.Records.Insert(2)

    Set Item = Record.AddItem("")
        Item.HasCheckbox = True
        Item.Checked = False
    Record.AddItem "RE: Your Invoice"
    Record.AddItem "John Smith"
    Record.AddItem "19/06/2004"
    Record.AddItem "18k"

    wndReportControl.Populate

Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
sosepe View Drop Down
Groupie
Groupie


Joined: 09 March 2007
Location: Italy
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote sosepe Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2012 at 6:45am
Many Many thanks for the reply !

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.203 seconds.