Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How am I supposed to do this?
Message
De
12/11/1998 10:16:21
 
 
À
12/11/1998 08:35:13
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00156920
Message ID:
00156963
Vues:
31
Hi Calvin ---

I don't know if this is a "class" issue. It looks like your report and/or grid would benefit from a view where FigureAmountDue is a calculated field in the view and Cust1 and Cust2 are joined...something like:

CREATE VIEW custjoin AS ;
SELECT cust1.*,cust1calc() AS AmountDue FROM cust1 ;
UNION SELECT cust2.*,cust2calc() AS AmountDue FROM cust2

Of course, cust1calc() and cust2calc() would be UDF's that returned a numeric value.

>I have a customer table made up of customers of at least 2 different types. I create three classes: BaseCust, Cust1, and Cust2. For the sake of illustration the method FigureAmtDue is completely different for Cust1 and Cust2. I understand how this works in plain jane code: Create an instance of whichever class you are working with and call the method. However, how is this done on a report where I am trying to figure the total amount due for all customers? Do I create an instance of the class on the record break and subsequently destroy it only to call it again? I must be missing something in my understanding of Classes or is this the way it is actually done? I guess the same thing would apply on a grid if there is a calculated field. Someone please help me before I completely screw up a project. Thanks :)
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform