by Dan P. Blank
| Dan presents an imaginative and effective technique for producing a bar graph in Alpha Five. Dan can be reached at danblank@bigfoot.com |
Want to see Alpha 5 do a graph? You can create a very simple graph with variables, a browse table and the color equation features.
Suppose you would like a graphic representation of how many days off an employee takes compared to the number allotted to the employee. For our example, let's create a simple flat table. This table is named Days:
Figure 1. The Days table.
Next let's create a calculated field rule for the percent field. We want the days per year to be divided by the days taken:

Figure 2. Calculated field rule for the percent field.
Next we move into designing the form. From the Control Panel go to the Forms tab, select New, assign this form to the Days table, and start from a blank form. Drag out the four fields from the Drag-Drop List, and place them near the top of the form. Then go to the menu bar, select Form and then select Variables. Here create 10 variables named 1 through 10 as shown in Figure 3:
Figure 3. Create 10 layout-level variables on the form.
From the Tool box:
If(percent>=0.1,"green on green","white on white")
This script checks the percent field and determines if the percent value is greater than or equal to 0.1 (10%). If it is, it changes the variable 1 field to green, otherwise it leaves it white. For variable 2 we will set the greater than or equal to value to 0.2 (20%). Do the same with variable 3 through 10.
Click OK and OK and then follow the same procedure for the next column. Only this time, change the value of 0.1 to 0.2. Do the same with variables 3 through 10.
After all of that, select Properties for the browse table and remove the check mark from tab stop and place a check mark in read only. Under the browse appearance you may also want to remove the horizontal and vertical scrollbars.
Other appearance suggestions are to change your column headings to reflect the proper percentage amounts. Size the table to show only one row of data. Adjust your column widths. When you get done your form should resemble Figure 4:

Figure 4. Graph form - design view
As you enter employee information the browse table will now give a graphic representation of days taken off expressed as a percentage.
Want a graph with 5% increments? Simple - create 20 variables and adjust your color equation accordingly!
This technique may not solve all of your graphing needs. However, this exercise is designed to get you thinking about the possibilities. For example:
Figure 5. Employee absenteeism chart.
Enjoy and have fun!
| Dan Blank is a Material Program Control Manager for Qwest Commnications in Dallas, Texas. His main use of A5 is to keep track of Qwest's inventory at 170+ sites from South Texas to Eastern Pennsylvania. He started using Alpha Five version 1 in 1996 and, in his words, "is continually upgrading to the latest and greatest versions of Alpha 5 available." You can reach Dan at danblank@bigfoot.com |
2/24/99
Don't forget, we need your feedback to make this site better!