Print Page | Close Window

FindRecordItem

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=14463
Printed Date: 15 November 2024 at 2:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FindRecordItem
Posted By: markmark
Subject: FindRecordItem
Date Posted: 07 June 2009 at 6:33am
 
Hi
 
Please could someone help me with the code below,
I cannot get FindRecordItem to work.
 
It should find the value "Wendy" i think!
 
 
Thanks
 
MArk
 
##################################################
 
 
Private Sub cmdFind_Click()

Dim lngCount As Long
Dim repRecItem As ReportRecordItem

lngCount = ReportControl1.Rows.Count


Set repRecItem = ReportControl1.Records.FindRecordItem(1, lngCount, 1, 3, 0, 3, "Wendy", xtpReportTextSearchExactPhrase)
If repRecItem Is Nothing Then

Else
    MsgBox "Found"
End If

 
End Sub

Private Sub Form_Load()
Dim rRecord As ReportRecord


ReportControl1.Columns.Add 0, "Col1", 50, False
ReportControl1.Columns.Add 1, "Col2", 50, False


Set rRecord = ReportControl1.Records.Add
rRecord.AddItem ""
rRecord.Item(0).Value = "Mark"
rRecord.AddItem ""
rRecord.Item(1).Value = "1"
rRecord.AddItem ""
rRecord.Item(2).Value = "2"

Set rRecord = ReportControl1.Records.Add
rRecord.AddItem ""
rRecord.Item(0).Value = "Wendy"
rRecord.AddItem ""
rRecord.Item(1).Value = "1"
rRecord.AddItem ""
rRecord.Item(2).Value = "2"

ReportControl1.Populate


End Sub


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0



Replies:
Posted By: Aaron
Date Posted: 07 June 2009 at 7:23am
Hi Mark,
 
It looks OK to me
 
There are a few issues with this method, please read post https://forum.codejock.com/forum_posts.asp?TID=12897 - https://forum.codejock.com/forum_posts.asp?TID=12897
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: markmark
Date Posted: 08 June 2009 at 6:04am
Hi Aaron
 
Have looked through that post, but still can't get the FindRecordItem to work.
I'm on ver 13.
 
Do you have a working sample?
 
Thanks
 
MArk


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 08 June 2009 at 1:35pm
Hi,
 
I didn't see that you didn't use first column as start column, you have first column with Index 0;
 
 
This will work:
Set repRecItem = wndReportControl.Records.FindRecordItem(1, lngCount, 0, 1, 0, 0, "Wendy", xtpReportTextSearchExactPhrase)
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: markmark
Date Posted: 08 June 2009 at 4:40pm
Hi Aaron.
 
Support have told me to download 13.1 which fixes the problem.
However if it does work with 13.0    I would like to try, otherwise I will have to release a whole new setup and that is a real pain.
 
Here is my code
 
Thanks
 
MArk
 
http://forum.codejock.com/uploads/20090608_163843_find.zip - uploads/20090608_163843_find.zip
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 09 June 2009 at 2:48pm
Hi Mark,
 
I'm sorry (again) but I did test with some beta version and of course it works, Mark fixed these. But you can use one option with V13.0 that actually works:
 
Set repRecItem = ReportControl1.Records.FindRecordItem(0, lngCount, 0, 1, 0, 0, "rk", xtpReportTextSearchBackward)
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: markmark
Date Posted: 15 June 2009 at 4:38am
Thanks Aaron
 
Mark


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0



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