Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get all employee
Message
De
10/02/2005 08:35:13
 
 
À
10/02/2005 08:22:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Divers
Thread ID:
00985090
Message ID:
00985517
Vues:
24
I don't understand. I thought you were selecting the employees into the cursor because you only wanted those that meet the criteria. BUT, after selecting the employees, you select Tax1 as the source for the report. I suggested Select EMPLOYEES for the report - but I guess you know what you're doing????

Have you checked you're getting the results that you wish?

Also, as Alex said, the "scan while no=M.NO" will only work IF all the tax1 records with no=M.NO are together, in a row, i.e. indexed.

Also, now I see you're scanning MSTR whereas before it was Tax1

I'm totally confused!

If all the records in your report need to show the dat field then I suggest you use:
Select * from tax1, m.dat as Datfield ;
  where no=m.no and montno between m.nMin and m.nMax ;
     into cursor employees
>hi,
>ok,it works,but i need to get m.dat at my report,m.dat=dat this field at mstr table he get the same m.dat for all emplyee.
>
>CLOSE ALL
>USE MSTR IN 0
>SELECT MSTR
>M.DAT=DAT
>m.no=NO
>m.nMin=1
>m.nMax=15
>scan WHILE no=M.NO
>  Select *from tax1 where no=m.no and montno between m.nMin and m.nMax ;
>     into cursor employees
>     SELECT tax1
>  report form coptax111 preview
>
>ENDscan
>
>
>>You're still not selecting the table that is the source for the report
>>i.e
>>
>>m.no=NO
>>m.nMin=1
>>m.nMax=15
>>scan WHILE no=M.NO
>>  Select *from tax1 where no=m.no and montno between m.nMin and m.nMax ;
>>     into cursor employees
>>  SELECT EMPLOYEES                && for the report
>>  report form coptax111 preview
>>ENDscan
>>
>>
>>NOTE you don't even need:
>> Select tax1 &&or select mstr
>>because SCAN automatically selects the corect table it scans
>>
>>
>>>hi,
>>>ok, i try as under but no skip to another emplyee he get the first employee evry time
>>>
>>>CLOSE ALL
>>>
>>>USE MSTR IN 0
>>>SELECT MSTR
>>>M.DAT=DAT
>>>USE tax1 IN 0
>>>SELECT tax1
>>>
>>>m.no=NO
>>>m.nMin=1
>>>m.nMax=15
>>>scan WHILE no=M.NO
>>>Select *from tax1 where no=m.no and montno between m.nMin and m.nMax into cursor employees
>>>report form coptax111 preview
>>>Select tax1 &&or select mstr
>>>ENDscan
>>>
>>>thanks
>>>
>>>>M
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform