At 08:20 AM 12/2/2008, Jim Belisle wrote:
Below is the present syntax for printing a specific report
(KayParkQuote) to either the screen, printer or file. What
I want to do is give the sales person the option of choosing
between two different reports rather than using only the one
report. Is the CHOOSE command the best command to use?
Jim,
Here's how:
01. Create a VIEW to list all Reports with Comments:
-- Start
SET ERROR MESSAGE 677 OFF
DROP VIEW ListOfReports
CREATE VIEW `ListOfReports` (ReportName,ReportComments) +
AS SELECT Sys_Report_Name,Sys_Comment +
FROM Sys_Reports3 ORDER BY Sys_Report_Name
COMMENT ON VIEW `ListOfReports` IS +
'List of Reports to be Shown in CHOOSE, Combo/List Boxes'
RETURN
-- End
02. Create a form with Variable Lookup ComboBox, Variable
Lookup ListBox, Variable Lookup ListView, or use the
CHOOSE command to list both columns from ListOfReports
to return the value as variable, such as, vReportName
Once you have the variable with selected ReportName, do what
you need to do to achieve your goal.
And that's all there is to it!
Very Best R:egards,
Razzak.