Print Page | Close Window

How to focus a row with a specified date

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7505
Printed Date: 12 November 2024 at 8:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to focus a row with a specified date
Posted By: tristoon
Subject: How to focus a row with a specified date
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.



Replies:
Posted By: tristoon
Date 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


Posted By: sserge
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net