Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How to focus a row with a specified date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to focus a row with a specified date

 Post Reply Post Reply
Author
Message
tristoon View Drop Down
Newbie
Newbie


Joined: 18 May 2007
Location: France
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote tristoon Quote  Post ReplyReply Direct Link To This Post Topic: How to focus a row with a specified date
    Posted: 02 July 2007 at 10:28am
Hello,
 
I'm using the ActiveX "calendarControl" and the activeX "ReportControl" in the same time.
 
So, when I click on a day on the Calendar, I would like the reportControl focusing on the row with the specified date.
 
Is it possible to search a row in the report control with a specified value, and if the row is found, to focus directly on this row?
 
 
Thanks
 
PS: I'm using the version 9.81.
Back to Top
tristoon View Drop Down
Newbie
Newbie


Joined: 18 May 2007
Location: France
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote tristoon Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2007 at 8:40am
I'm using the datePicker and, when I click on a day, I just want the reportControl pointing on the row wich corresponds to my date clicked !
 
And, my code is below(I'm using PROGRESS L4G):
 
DEF VAR tmpDate AS CHAR NO-UNDO.
DEF VAR compt AS INT NO-UNDO.
DEF VAR iii AS INT NO-UNDO.
DEF VAR tmpCH AS COM-HANDLE NO-UNDO.

tmpdate = chdatePick:datePicker:SELECTION:blocks(0):dateBegin.
compt = chreport:Reportcontrol:records:Count.

DO iii = 0 TO compt:
   tmpCH = chreport:Reportcontrol:records:record(iii).
   IF tmpCH:ITEM({&COLUMN_DATE}):VALUE = tmpDate THEN
        DO:
         chReport:Reportcontrol:TopRowIndex = iii.
        END.
     iii = iii + 1.
END.

 
My problem is:
when the report find my row corresponding, the row count is not good, the topRowIndex doesn't point to the good row !!
 
Please, anybody can help me??
 
Thanks
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: 04 July 2007 at 4:20pm
Hi,

Use EnsureVisible method.

Tt could look like (not sure in your syntax):

tmpCH = chreport:Reportcontrol:records:record(iii).  // your code
chreport:Reportcontrol:Rows:FindRow(tmpCH):EnsureVisible


--
WBR,
Serge
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.156 seconds.