Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Redirecting Set fields to output to Text file
Message
De
31/05/1997 19:43:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
31/05/1997 11:25:36
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00034371
Message ID:
00034393
Vues:
28
>I have 2 files 1 parent and 1 child
>
>the relation is set to 1 to many. through set fields to command i get a nice output in a grid, where parent records are shown as asterixs (******) and child records are shown one by one
>
>Is there a way to redirect the set fields to output to a text file or by any way I can print that output,
>
>Instead of (*****), it may show parent table fields as blank.
>
>Pls help !!

You can do it a few ways :
1- Assume parent named pr and child ch and relation set and set fields issued.
select ch
chfields = set("fields",1) && fields set for child
select pr
prfields = set("fields",1) && fields set for parent
set library to fpath && foxtools.fll if windows
lnSpaces = 0
for ixc = 1 to words(prfields)
lnSpace = lnSpace + fsize(wordnum(prfields, ixc, " ,"))
endfor
set fields off && Turn off set fields temporarily
set alternate to myfile.txt
set alternate on
scan
? &prfields
select ch
if !eof() && Else nothing to print
?? &ch
skip
endif
scan while ch.linkexp = pr.linkexp && Whatever your relation is
? space(lnSpaces) , &ch
endscan
select pr
endscan
set alternate to
set alternate off && No more space but this is ok and works
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform