Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying on most current
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Displaying on most current
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01309704
Message ID:
01309704
Vues:
50
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform