![]() |
Selecting Report Row |
Post Reply
|
| Author | |
DDJJ
Senior Member
Joined: 13 December 2004 Status: Offline Points: 143 |
Post Options
Thanks(0)
Quote Reply
Topic: Selecting Report RowPosted: 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
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 March 2005 at 1:16pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 March 2005 at 1:35pm |
|
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
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 March 2005 at 2:47pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 March 2005 at 3:13pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2005 at 8:59am |
|
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
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2005 at 9:25am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2005 at 9:32am |
|
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 |