Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add a custom method to a listbox
Message
De
04/08/2000 10:39:57
 
 
À
03/08/2000 20:01:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00400785
Message ID:
00401062
Vues:
17
How were you going to do it in the listbox?
You'd either have to have a massive CASE statement or go off values in the list - I'm assuming you were going to do the latter.
I would have separate programs for each report process and let them handle the data munging and REPORT calls. Store the program names in the data and include them in the list's RowSource source. Then you can just get that out of the list.

e.g.,
** listbox
PROCEDURE Init()

WITH this
  .RowSourceType = 5
  .RowSource = "thisform.aList"
  .ColumnCount = 1
ENDWITH

SELECT report_desc, report_prog ;
  FROM reportlist ;
  INTO ARRAY thisform.aList

this.Requery()
ENDPROC
** end listbox

** form method, called from cmdPrint.Click()
PROCEDURE RunReports
WITH this.listbox
  lcProg = .List(.ListIndex,2)
  lnPrintTo = .opgPrintTo.Value
  DO (lcProg) WITH lnPrintTo && and any other params...
ENDWITH
ENDPROC
Does something like that work?
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform