Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you macrocubstitute on a Report?
Message
De
30/06/2000 12:06:13
 
 
À
30/06/2000 11:42:15
Brent Knight
Progressive Impressions International
Bloomington, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00387100
Message ID:
00387132
Vues:
12
>
COPY STRUCTURE EXTENDED TO holdtbl
SELECT 0
USE holdtbl
SELECT holdtbl
SCAN
IF(holdtbl.field_name = "c_ordrcode")
lcorder = "c_ordrcode"
ELSE
lcorder = "O_rec_id"
ENDIF
ENDSCAN
drop table holdtbl

So if C_ordrcode is in the table then I want the c_ordercode printed, otherwise I want the O_rec_id printed.

See what I mean?
<

If the table is in the DBC, how about:

Code in a program calling the report:

PRIVATE plUse_C_Ordrcode && this or public in report.INIT required for variable to have scope

plUse_C_Ordrcode = INDBC ("TableName.c_ordrcode", "FIELD")


Value in the report field:

IIF (plUse_C_OrdCode, c_ordrcode, O_rec_id)

In this case, macro substitution may offer an appropriate alternative -- as that would be performed once for the report, the IIF for each line of the report.

In that case, I think the problem is the scope of your original variable -- make sure to declare it a private in a routine calling the report, or a public in the report INIT and then release it upon report conclusion.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform