Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Selecting Report Row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Selecting Report Row

 Post Reply Post Reply
Author
Message
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Topic: Selecting Report Row
    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

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2005 at 3:13pm

What I'm doing now seems kind of inefficient:

Dim oRow As ReportRow
   
    With objReport
        For Each oRow In .Rows
             If Not oRow.GroupRow Then
                 If oRow.Record.Tag = lItemID Then
                     .FocusedRow = oRow
                     Exit For
                 End If
             End If
        Next
    End With

Would rather see something along the lines of:

objReport.FocusedRow = objReport.Rows.Selected.Tag(lItemID)

or something similar...

Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
DDJJ View Drop Down
Senior Member
Senior Member


Joined: 13 December 2004
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote DDJJ Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2005 at 9:32am
Thanks SuperMario.  Will put on my to do list!
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.141 seconds.