Print Page | Close Window

Unable to Purge a record using RemoveRecordEx

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7033
Printed Date: 18 July 2025 at 7:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Unable to Purge a record using RemoveRecordEx
Posted By: blkn
Subject: Unable to Purge a record using RemoveRecordEx
Date 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...



Replies:
Posted By: mlatona
Date Posted: 13 May 2007 at 5:07am
I have the same problem. What is the problem? Is it a bug? Have Codejock a fix?


Posted By: sserge
Date 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


Posted By: blkn
Date 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...


Posted By: sserge
Date 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


Posted By: blkn
Date 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...


Posted By: sserge
Date 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 - uploads/20070515_185243_blknSample.zip

--
WBR,
Serge


Posted By: mlatona
Date 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


Posted By: sserge
Date 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


Posted By: blkn
Date 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...


Posted By: sserge
Date Posted: 19 May 2007 at 10:10am
Should be available in public in about 1 week or less.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net