Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying on most current
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Displaying on most current
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01309704
Message ID:
01309704
Views:
49
I am setting up this query here.
SELECT DISTINCT Sitedata.id, Sitedata.site_name, Sitedata.resp_party, Sitedata.r1,;
  Sitedata.street, Sitedata.city, Sitedata.status, Sitedata.material,;
  Sitedata.date_rep, reports.recvdate, reports.respdate, reports.rptname;
 FROM ;
     events!Sitedata;
 LEFT OUTER JOIN events!reports ;
   ON  sitedata.id = reports.id;
 WHERE ISBLANK(reports.respdate) = .T.;
 		AND (Sitedata.status = "O" OR Sitedata.status = "M");
 		AND DATE() > reports.recvdate + 30 ;
 		AND ISBLANK(reports.recvdate) = .F.;
 ORDER BY Sitedata.id;
 INTO CURSOR reviewer
WITH thisform
.WindowState = 2
ENDWITH	
BROWSE
thisform.Visible = .F.
WITH thisform
.WindowState = 0
ENDWITH	
DO FORM frmexport.scx TO m.exportcheck
IF m.exportcheck = "a"
	EXPORT TO C:\Temp\NoReviewer.xls TYPE xls 	
ENDIF 
thisform.Visible = .T.
I need to display only the report entry that has the most recent rcvdate as a lot of them have many reports. What would be a way to do this in a query. I can think of other ways, such as creating a flag in the reports table, but I am hoping not to take that route. This seems like it should be simple, but it isn't coming to me.
Next
Reply
Map
View

Click here to load this message in the networking platform