ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Rapport multi bande de détail   



L'auteur

Nathalie Chacon
France France
Membre Simple
# 0000000022
enregistré le 13/10/2004

84510 CAUMONT SUR DURANCE
de la société Design or decline
Fiche personnelle


Note des membres
pas de note

Contributions > 03 - FRX : Etat, impression, Report

Rapport multi bande de détail
# 0000000468
ajouté le 23/08/2007 10:51:51 et modifié le 23/08/2007
consulté 7901 fois
Niveau débutant

Version(s) Foxpro :
VFP 9.0


Télécharger le ZIP (2.36 Ko)
Description

Faire un rapport en multi bande de détail avec des curseurs.
Cet exemple est basé sur un de ceux que l'on peut trouver dans VFP9

Code source :
*---> Curseur du personnel
select 0
create cursor PERSONNEL (MATRICULE C(2), NOM C(10), PRENOM C(10))
index on MATRICULE tag MATRICULE

*---> Curseur des Villes du personnel
select 0
create cursor VILLE (MATRICULE C(2), VILLE C(20))
index on MATRICULE tag MATRICULE

*---> Curseur des ventes
select 0
create cursor VENTE (MATRICULE C(2), NOINTERNE C(10), CLIENT C(10))
index on MATRICULE tag MATRICULE

*---> Remplissage du curseur Personnel
select PERSONNEL
append blank
replace MATRICULE with "01", ;
        NOM       with "DUPOND", ;
        PRENOM    with "PIERRE"
append blank
replace MATRICULE with "02", ;
        NOM       with "DURAND", ;
        PRENOM    with "JACQUES"

*---> Remplissage des Villes
select VILLE
append blank
replace MATRICULE with "01", ;
        VILLE     with "AVIGNON"
append blank
replace MATRICULE with "01", ;
        VILLE     with "CAVAILLON"

append blank
replace MATRICULE with "02", ;
        VILLE     with "MARSEILLE"
append blank
replace MATRICULE with "02", ;
        VILLE     with "AIX EN PROVENCE"

*---> Ventes
select VENTE
append blank
replace MATRICULE with "01", ;
        NOINTERNE with "0000000001", ;
        CLIENT    with "TOTO"
append blank
replace MATRICULE with "01", ;
        NOINTERNE with "0000000002", ;
        CLIENT    with "TITI"
append blank
replace MATRICULE with "01", ;
        NOINTERNE with "0000000003", ;
        CLIENT    with "TATA"

append blank
replace MATRICULE with "02", ;
        NOINTERNE with "0000000004", ;
        CLIENT    with "MACHIN"
append blank
replace MATRICULE with "02", ;
        NOINTERNE with "0000000005", ;
        CLIENT    with "BIDULE"
append blank
replace MATRICULE with "02", ;
        NOINTERNE with "0000000006", ;
        CLIENT    with "TRUC"

*---> Relation
select PERSONNEL
set order to MATRICULE && MATRICULE
set relation to MATRICULE into VILLE, ;
                MATRICULE into VENTE additive

*---> Edition
report form "TEST" preview

*---> Suppression des curseurs
select VILLE
use
select VENTE
use
select PERSONNEL
use

return

Commentaires
Aucun commentaire enregistré ...

Publicité

Les pubs en cours :

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3