Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFp 6 Using a case statement in a report field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00339722
Message ID:
00339728
Vues:
20
>Hi All,
>
>Is it possible to use a case statement in the expression of a field in a report form?
>
>This works in a third party report writer (R&R):
>
>case(section,"A","Mares Foaled","B","Mares Bred","C","Mares Treated","D","Absentees","")
>
>If I enter this in the expression box in a field added to the vfp report designer and, then run the report, I get a "case.prg not found" error message.
>
>I guess I could use iif's in multiple fields but it seems easier to use the case.
>
>Any help would be appreciated.
>
>Thanks,
>
>Jim Harvey
>jharvey@netrax.net

At least two possibilities, one use a nested iif(), the other write a udf() and call it in the report writer. In the textbox instead of putting the field name you just put the udf as in - getthisdata().
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform