Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Merge four tables into 1 cursor
Message
 
À
28/12/2004 05:27:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Novell 4.x
Database:
Visual FoxPro
Divers
Thread ID:
00972379
Message ID:
00972511
Vues:
15
>Boris, right join successfully updated the records. Now I want the summary of it. How can I do so. Please note summary on Item code.
>
>Second, how can I put variable for counting for group header.
>
>How to generate group header for a report.
>
>Thanx - Saif

In the report designer go to Report menu & Choose Data Grouping
Then put field from Cursor On wich You want to group the report (i.e. ICode). Cursor must be ordered by it.
When You add a Group ,Group Header & Group Footer will appear in report designer.
Put a vaiable in report Choose SUM for it, In Value to Store put The Cursor Field that You want to SUM (i.e. QntMaj),
In Reset At choose Group field & check Relase After Report.

To be more helpful, can You put some example of the date & how to report must look like?

i.e.
Table SiMain
SiNo     PCode       SalesMan ...
1        1           Peter
2        2           George
....
*Table SisUb
SiNo     ICode       QntyMin   QntyMaj     RateMin      RateMaj ...
1        1            1        100         1            20  
1        2            1        50          1            11
2        1            0        70          1            30
2        2            1        25          1            35
....

*Table PCode
PCode     PName
1         Some goods
2         Other goods
....

*Table ICode
ICode      Full_Desc
1          Item 1
2          Item 2
....

SELECT SiMain.*, SisUb.ICode, SisUb.qntymaj, SisUb.qntymin, SisUb.RateMaj, SisUb.RateMin,;
       PCode.PName, Icode.full_desc;
       FROM SiMain;
       RIGHT JOIN SisUp ON SiMain.SiNo == SisUp.SiNo;
       LEFT JOIN PCode ON SiMain.PCode == PCode.PCode;
       LEFT JOIN Icode ON SisUp.Icode  == Icode.Icode;
       WHERE BETWEEN(Simain.Invdate, mdt1, mdt2)        .AND.;
             UPPER(Simain.Salesman) == UPPER(msalesman) .AND.;
             Simain.PCode == mpcode;
   INTO CURSOR cTest

*Cursor  cTest
SiNo     PCode PName          ICode  Full_Desc     QntyMin   QntyMaj     RateMin      RateMaj Salesman 
1        1     Some Goods     1      Item 1         1        100         1            20      Peter
1        2     Other Goods    2      Item 2         1        50          1            11      Peter
2        1     Some Goods     1      Item 1         0        70          1            30      George
2        2     Other Goods    2      Item 2         1        25          1            35      George
How You want to display data in report?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform