![]() |
Selecting Report Row |
Post Reply ![]() |
Author | |
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() Posted: 14 March 2005 at 1:09pm |
Besed upon user input, we want to select a particlar report row for focus in code. Currently, we are iterating through the Rows collection to find and select the report row. On larger reports, this can be time consuming. Is there a way to set the focus on a row via using some kind of unique identifier for each row/record? Dan |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
You can try to use BeforeDrawRow to check the row to see if it is the
one you are looking for. This way you are checking for your row
as the before the row is being drawn. You won't have to manually
iterate through the rows.
|
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
I don't think I understand your response, or maybe my question is vague. Say our user already has a report drawn on their screen with 100 records/rows. Assume the user takes some other action which requires that the FocusedRow in the report control be moved to a different record/row on the report. The BeforeDrawRow event is not called under these circumstances, correct? Thanks! |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Hmm, after thinking this through, this solution would only work if the other row you want to focus is currently visible.
|
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
What I'm doing now seems kind of inefficient: Dim oRow As ReportRow Would rather see something along the lines of: objReport.FocusedRow = objReport.Rows.Selected.Tag(lItemID) or something similar... |
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
So I will assume there is no way to set the "FocusedRow" based upon some unique ID without first have to iterate through the Rows collection, correct?
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
I don't see an obvious answer for this. Mabye send in a feature request for a ReportRecords.Find method or similar.
|
|
![]() |
|
DDJJ ![]() Senior Member ![]() Joined: 13 December 2004 Status: Offline Points: 143 |
![]() ![]() ![]() ![]() ![]() |
Thanks SuperMario. Will put on my to do list!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |