Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add a custom method to a listbox
Message
From
04/08/2000 10:39:57
 
 
To
03/08/2000 20:01:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00400785
Message ID:
00401062
Views:
16
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform