Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro/name substitution
Message
De
01/12/1998 12:43:02
 
 
À
01/12/1998 12:37:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00162838
Message ID:
00162841
Vues:
22
>I have designed a report in which I want to use macro/name substitution for the fields. The actual field names in the .dbf are faciltime1, faciltime2,...faciltime12,drrtime1, drrtime2,...drrtime12, etc. I use m.rptfield1, m.rptfield2,...m.rptfield12 as the memvars which will be used for the substitution. For example, m.rptfield1 = 'faciltime1', etc.
>
>The problem I am having is that I keep getting error messages when i run the report. If I use the format &m.rptfield1 in the report, I get the message there is a syntax error. If I use (m.rptfield1) the report displays the first few letters of the field name, for example, "facil". Only when I use the actual name of the field in the .dbf do i get the proper results.
>
>My objective in using macro/name substitution is to eliminate the need to create 10 separate reports, all of which use the same format, but each of which uses a different field in the .dbf.
>
>Any help will be appreciated,
>
>Alan Zaben
>cancer_survivor@yahoo.com


Leave the M. off of the macro. Use &rptfield1 not m.&rptfield1. The "." stops the macro expansion and is looking for a variable named "M", hence the syntax error.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform