Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting the amount of printing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00600059
Message ID:
00600248
Vues:
15
>Hi all,
>
>I want to count the amount of printing an invoice and save it to a field.
>Users can preview the invoice first then print it or directly print the invoice
>without preview first.
>
>The problem is how could I save it to a field with two conditions above ?
>I appreciate for any help.
>
>TIA,
>
>Budianto



Create a Page Summary band (it can be a zero height) and call a UDF in the On Exit option. In the UDF, do something like:
LOCAL lcAlias
lcAlias = ALIAS()
SELECT InvoiceHeader
REPLACE PrintCount WITH PrintCount + 1
SELECT (lcAlias)
If you only want to increment the count when the user "Prints" and not when they "preview", change the code as follows:
IF WEXIST('Printing...')
  LOCAL lcAlias
  lcAlias = ALIAS()
  SELECT InvoiceHeader
  REPLACE PrintCount WITH PrintCount + 1
  SELECT (lcAlias)
ENDIF
Hope this helps,
Cathy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform