Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Unable to Purge a record using RemoveRecordEx
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unable to Purge a record using RemoveRecordEx

 Post Reply Post Reply
Author
Message
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post Topic: Unable to Purge a record using RemoveRecordEx
    Posted: 03 May 2007 at 1:30am
When i try to use the ReportControl's RemoveRecordEx / RemoveRowEx  to eliminate a row as well as record from the ReportControl, the application throws the "Type mismatch" error, the code snippet for the same has been detailed below,
 
Code Snippet:
 
Private Sub ReportControl1_RowRClick(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem)
    Dim popId As Long, ChildRecord As ReportRecord

    popId = PopupBar.ShowPopup(TPM_RETURNCMD)
    Select Case popId
        Case 0
             ReportControl1.RemoveRecordEx Row
             ReportControl1.Populate
        case else
    end select
   
End Sub   

Immediate action required.
 
 
Bala...
Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 5:07am
I have the same problem. What is the problem? Is it a bug? Have Codejock a fix?
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 2:40pm
Originally posted by blkn blkn wrote:


        Case 0
             ReportControl1.RemoveRecordEx Row
             ReportControl1.Populate
        case else



Don't you see some mismatch in the name of the method and a parameter?

--
WBR,
Serge
Back to Top
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2007 at 1:03am
Even if, you pass the record object to the  RemoveRecordEx method, the result remains the same. i.e. we are getting the type mismatch error. 
 
To Simulate the same, Open a Vb Std Exe Project, add reportcontrol and commandbars of Codejock 11.1.0 release. Then put the following code block into the form1 module.
 
'Code Block:
 
Dim PopupBar As XtremeCommandBars.CommandBar
Private Sub Form_Load()
    Dim xR As ReportRecord, i As Integer, j As Integer
   
    Dim xbtn As CommandBarControl
    Set PopupBar = CommandBars1.Add("Popup", xtpBarPopup)
    With PopupBar.Controls
        Set xbtn = .Add(xtpControlButton, 0, "Remove Record")
    End With
   
   
    For j = 0 To 3
        ReportControl1.Columns.Add j, "Col" & Str(j), 100, True
    Next j
   
    For i = 1 To 20
        Set xR = ReportControl1.Records.Add
        For j = 1 To 4
            xR.AddItem "Cell" & Str(i) & Str(j)
        Next j
    Next i
    ReportControl1.Populate
End Sub
Private Sub Form_Resize()
    ReportControl1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub
Private Sub ReportControl1_RowRClick(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem)
    Dim popId As Long, ChildRecord As ReportRecord
    popId = PopupBar.ShowPopup(TPM_RETURNCMD)
    Select Case popId
        Case 0
             'ReportControl1.RemoveRecordEx Row.Record
             ReportControl1.RemoveRowEx Row
             ReportControl1.Populate
        Case Else
    End Select
   
End Sub

 
Bala...
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2007 at 5:49pm
This may sound strange, but your code work for me perfectly...

I suppose that you do have a few different versions of the Report control, and "Type mismatch" is between different versions of calling procedure and called object. Check components references of your project.

--
WBR,
Serge
Back to Top
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2007 at 2:00am
Yes, this may sound strange, because it is fresh formatted m/c, in which i installed codejock 11.1.0.  Second thing, i had also verified the components references of the project, it is pointing to the required path.
Bala...
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2007 at 6:53pm
I've built your sample and it works. Check whether the same executable work for you.

uploads/20070515_185243_blknSample.zip

--
WBR,
Serge
Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2007 at 7:08am
Sorry, I become the same error (Type mismatch) when I start your executable. I use the version 11.1.0.0
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2007 at 4:52pm
Well, identified this as a known bug which is already fixed for version 11.1.2.

Thanks.

--
WBR,
Serge
Back to Top
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2007 at 1:09am
Thanks for the extended support.
Would i be able to know the possible due date of fix release.
Bala...
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 10:10am
Should be available in public in about 1 week or less.

--
WBR,
Serge
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.031 seconds.