Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SOLVED: Locate a row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Locate a row

 Post Reply Post Reply
Author
Message
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Locate a row
    Posted: 16 October 2007 at 3:22pm
Hi, there is a way to locate a row in the reporcontrol by a column value without iterate all the rows of it?
 
Excuseme my english, is so bad.
 
Elvis
Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
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: 16 October 2007 at 5:19pm
Some thing like this should help:

For Each Row In wndReportControl.Rows
    For Each RecordItem In Row.Record
        If RecordItem.Value = "..." Then
...


Also search forum, there were already similar questions.

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

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2007 at 7:21pm
I said a way that I do not to iterate all the rows to find the row. There is not a method that I can find the desired row only by a column value? (without iterate all the reportcontrol's records)
 
PD: Excuseme my english
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 October 2007 at 6:10pm
No.
Back to Top
JKDev View Drop Down
Groupie
Groupie


Joined: 27 September 2007
Location: Ireland
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote JKDev Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2007 at 5:30pm
Hmm, it would be great if you could provide a function to quickly search all of the records .tag property for a match. such as
 
Report.Records.FindTag "172" etc.
 
It is essential to be able to locate the record that is associated with a particular database row based on a primary key.
 
Iterating through all of the records as suggested is time consuming. Perhaps you could add a .Key property for the Record similar to a ListView.ListItem.Key? That way we could retrieve the correct row with code like this
 
msgID = "M" + ltrim$(str$(rs("msgID")))
 
set rec = Report.Records.Item(msgID)
Back to Top
johnlewe View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2007
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnlewe Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2007 at 9:22am
I agree. Looping through EVERY row is just not practical. The record object needs a key property. Likewise the column object needs a key. Every time I need to refer to a RecordItem, I need to remember the numerical index value of the column. In the ListView control you can refer to the RecordItem using the NAME/KEY of the column. It makes the code ALOT more readable and easy to maintain. What I have done to workaround this limitation is to store the name of the column in the .tag property of the column and then I have to call a function that loops through every column in the control until it finds that tag and then returns the numerical index of the column.

Is there a specific reason by design why the ReportControl does not have "key" objects? Or is this coming in a future revision? We replaced our listview control with the Codejock ReportControl to get past the limitations of the listview control, but in this case, those limitations are being replaced with Codejock ReportControl limitations which the listview control did not have.

Make us all very happy and add this basic feature that the listview control has...please...
John Lewe
Orlando, FL
Back to Top
JKDev View Drop Down
Groupie
Groupie


Joined: 27 September 2007
Location: Ireland
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote JKDev Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2007 at 6:05pm

yup, the more i use it the more i see thus as an absolute must have...

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