home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' DVForm.rlz
- '
- ' Executive Information System Demo
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- '***********************************************************************
-
- RUN "StdArray"
- RUN "StdSys"
-
- PROC MakeDV
- LOCAL font1
-
- formDV = FormQUnique
- FormNew(formDV; "Realizer DataView", _Frame)
- FormControl(_Size; _Center, _Center, 60 pct, 90 pct)
-
- font1 = FontQUnique
- FontNew(font1; "Helv", 24, _Bold)
-
- FormSetObject(10, _CaptionLeft, "Realizer DataView", font1, 5 pct, 2 pct; _Blue)
- FormSetObject(11, _GroupBox, "", 5 pct, 13 pct, 90 pct, 0.5 pct)
- FormSetObject(12, _Bitmap, "Pharm.bmp", _Right, 15 pct)
- FormModifyObject(12, _Gray)
-
- FormSetObject(20, _GroupBox, "Segments", 3 pct, 15 pct, 33 pct, 30 pct)
- FormSetObject(21, _OptionButton, "Hospital", 6 pct, 21 pct; 1, 2)
- FormSetObject(22, _OptionButton, "Retail", 6 pct, 28 pct; 0, 2)
- FormSetObject(23, _OptionButton, "Total", 6 pct, 35 pct; 0, 2)
-
- FormSetObject(30, _GroupBox, "Units of Sale", 40 pct, 15 pct, 35 pct, 24 pct)
- FormSetObject(31, _OptionButton, "Dollars", 43 pct, 21 pct; 1, 1)
- FormSetObject(32, _OptionButton, "Prescriptions", 43 pct, 28 pct; 0, 1)
-
- FormSetObject(41, _CaptionCenter, "Select a category or item:", 40 pct, 42 pct, 56 pct, _Default)
- FormSetObject(40, _ListBox, "", 40 pct, 48 pct, 56 pct, 50 pct)
-
- FormSetObject(50, _BitmapButton, "Chart.bmp", 13 pct, 50 pct)
- FormSetObject(60, _BitmapButton, "Report.bmp", 13 pct, 63 pct)
- FormSetObject(70, _Button, "Help", 10 pct, 80 pct)
- FormSetObject(80, _Button, "Quit", 10 pct, 90 pct)
- FormSetProc(formprocDV)
- FormControl(_Show)
- END PROC
-
- PROC formprocDV(params)
- LOCAL n
-
- FormSelect(params[_FormNum])
- SELECT CASE params[_ItemNum]
- CASE 40 'ListBox
- n = list.itemnum[FormQNum(40)]
- IF n < 0 THEN
- list.expand[n*-1] = Not(list.expand[n*-1])
- ListBuild(40, n)
- END IF
- CASE 50 'Chart
- IF FormQNum(40) = 0 THEN
- EXIT PROC
- END IF
- ChartSales(list.itemnum[FormQNum(40)], FormQNum(31), IF FormQNum(21) THEN 1 ELSE (IF FormQNum(22) THEN 2 ELSE 3))
- CASE 60 'Report
- IF FormQNum(40) = 0 THEN
- EXIT PROC
- END IF
- ReportSales(list.itemnum[FormQNum(40)], FormQNum(31), IF FormQNum(21) THEN 1 ELSE (IF FormQNum(22) THEN 2 ELSE 3))
- CASE 70 'Help
- FormSelect(formDVHelp)
- FormControl(_Show)
- CASE 80 'Quit
- RESET _All
- EXIT PROGRAM
- END SELECT
- END PROC
-
- PROC ListBuild(id, catnum)
- LOCAL i, n, k, m
-
- CLEAR list.text
- n = 1
- FOR i = 1 to EndValid(data.catname)
- list.text[n] = data.catname[i]
- list.itemnum[n] = -i
- n = n + 1
- IF list.expand[i] THEN
- FOR k = 0 to data.catcount[i] -1
- m = data.catindex[i] + k
- list.text[n+k] = " " + data.itemname[m]
- list.itemnum[n+k] = m
- NEXT k
- n = n + data.catcount[i]
- END IF
- NEXT i
- FormModifyObject(id, _Clear; list.text, _ListSelect, FirstMatch(list.itemnum, catnum))
- END PROC
-
- PROC DVHelpInit
- LOCAL font1, font2, s, _EOLN
-
- _EOLN = Chr$(13) + Chr$(10)
-
- s = "This demonstration shows how Realizer can be used as a front end to display "
- s = s + "data in a variety of ways. The sales data for a fictional pharmaceutical company "
- s = s + "can be broken down by category, sales division, and market segement." + _EOLN + _EOLN
-
- s = s + "The list box shows the major categories for the medical compounds sold by the "
- s = s + "company. If you double-click on one of these categories, its sub-categories will be "
- s = s + "listed beneath in outline form." +_EOLN + _EOLN
-
- s = s + "Once you have selected a category, you can generate a sales report "
- s = s + "or graph the data by pressing the corresponding graphic button. The "
- s = s + "charts for the major categories are an example of ""hyper-charts."" If you click on one of "
- s = s + "the data lines, a chart showing the breakdown of the selected sub-category will be created."
-
- font1 = FontQUnique
- FontNew(font1; "helv", 28, _Bold)
- formDVHelp = FormQUnique
- font2 = FontQUnique
- FontNew(font2; "helv", 8)
- FormNew(formDVHelp; "About the Realizer DataView Demo", _Title + _Close + _HotClick)
- FormControl(_Size; 5 pct, _Center, 50 pct, 80 pct)
- FormSetColor(_Blue; _Text)
- FormSetObject(10, _CaptionCenter, "Realizer DataView", font1, _Center, _Top)
- FormSetColor(_Black; _Text)
- FormSetObject(20, _CaptionLeft, s, font2, _Center, 15 pct, 90 pct, 80 pct)
- FormSetObject(1, _DefButton, "OK", _Left, _Bottom)
- FormSetObject(5, _Button, "Exit Demo", _Right, _Bottom)
- FontControl(_Close)
- FormSetProc(formprocDVHelp)
- END PROC
-
- PROC formprocDVHelp(params)
- FormSelect(params[_FormNum])
- IF params[_ItemNum] = 5 THEN
- RESET _All
- EXIT PROGRAM
- END IF
- params[_UseRealizer] = 0
- FormControl(_Hide)
- END PROC
-
-
-