Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor statement causing duplicate records in report
Message
De
04/06/2008 12:39:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Cursor statement causing duplicate records in report
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01321649
Message ID:
01321649
Vues:
59
I am designing the last of the reports for this inventory program of mine (Never ending) I have a class for search form that is doing a date range from date to date and when I use the form with both comboboxes (username, strain) and fill out info it works great. But If I leave 1 combobox blank (no input) it will print duplicate or triplicate records.

With what little debug work I have done I am fairly lost, below is the code I am using for the form select records method
LPARAMETERS tcWhere
WAIT WINDOW NOWAIT 'Wait, please, while the records are selected...'

SELECT * from Trimm ;
WHERE &tcWhere ORDER BY UserID, Strain INTO CURSOR crsResults nofilter

IF RECCOUNT('crsResults') = 0
   =ErrorMsg("Your criteria didn't return any records...")
   RETURN 0
ENDIF

WAIT clear
PRIVATE cTitle
cTitle = "Help Desk Report for " + thisform.oSearchCollection.GetCriteriaInEnglish()
SELECT crsResults
REPORT FORM TrimUserTotalSXUserID TO PRINTER PROMPT preview
Any suggestions???

Thanks in advance.

Fred W.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform