Presentation is loading. Please wait.

Presentation is loading. Please wait.

External Executable Tools The Master's Touch David L. Blankenship.

Similar presentations


Presentation on theme: "External Executable Tools The Master's Touch David L. Blankenship."— Presentation transcript:

1 External Executable Tools The Master's Touch David L. Blankenship

2 What features do I want? Ability to establish columns programmatically Ability to format the column (right justified, left justified, centered, numeric, integer, and a variety of date formats Ability to sort ascending and descending Ability to specify column width and grid properties number of rows, colors, buttons, and provide the results in a usable format for continued processing

3 How are values passed in? The application is command line driven where the switches control the behavior Each switch is a dash followed by a character and in some cases a value. Switches appear in any order on a space delimited command line At a minimum, -B and -F must be specified, optional switches allow positioning of the grid on the display, set the constraints of size, appearance, features, etc.

4 What do the switches do? The file named in the -B parameter defines the location where the results will be returned The file named in the -F parameter is formatted to contain the information required to set the column appearance, the data appearance in the column and finally the data. An optional file defined by -W allows the data to come from a BR internal file. In this case part of the -F file defines the fields to display.

5 What is in the file? The first line of the source file (referred to as the -F parameter) is the name of each column followed by a colon and the desired width of the column (pixels). Columns are separated by a pipe character. The second line describes the format used to display the data. The third and following lines are the data fields in pipe delimited format. (Use of a BR internal file to provide the data will be discussed separately) code:60|Description:130 I5|l 1|State Govmt 2|County Govmt 3|Restaurant 4|Fast Food 5|Construction 6|Piddle 15|Playing

6 Our First Grid! The simplest form of the command line is shown below: C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt The grid is the product of the data previously shown and the command line above:

7 How has the appearance changed? Expanding the command line with additional switches will alter the grid's appearance and capabilities. Adding the -Z removes the “find feature” allowing a smaller minimum width. The dimensions of the grid are dynamically determined subject to constraints of display resolution (maximum) and optional buttons/features (minimum). C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -Z

8 Readability changes with color. The command line switch -A adds alternating background color which defaults to a pale green. C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -A

9 Customized background color. The command line switch -A followed immediately by a RGB color in hexadecimal format allows a user defined alternating background color. C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -AFFCCCC

10 What's in a name? Further addition of the -C parameter adds a caption that appears on the grid caption and on the taskbar. C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -AFFCCCC -C”Select the Area of Service”

11 The Grid slims down. Adding the -E switch will remove the upper panel. This is useful when you are wanting to provide a “pick list” for values to populate a BR field (limited to values in the list). C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -Z -E

12 It continues to shrink! Continuing to add switches, -J will remove the bottom panel but it requires -M (which turns multi-select OFF) and -Z ( turns OFF the “Find feature”). C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -Z -E -J -M When this style is used a single row may be selected by double- clicking on the row itself, highlighting the row and pressing Enter, or exiting without selecting anything by pressing Escape, which is always an option.

13 Controlling the height. Continuing to add switches -N# specifies the number of rows to display. If the actual number of rows of data is less than the number specified, the number will be reduced to the actual number of rows. C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -Z -E -J -M -ACCCCFF -N5

14 Changing the border style. Additional changes to appearance may be made with either -S1 (left) or -S2 (right) C:\brag\...\BRGrid.exe -B999 -Fpiddle.txt -Z -E -J -M -S1

15 Changing the font. The -O# switch changes the default font size (points). The grid on the left is the default 10 point size. The one on the right uses -O12. C:\brag\...\BRGrid.exe -B999 -ACCCCFF -Fpiddle.txt -Z -E -J -M -O12

16 Working with BR Internal Files. The -W switch names a BR internal file (typically requires a drive letter and path) as the data source. Lines 3 and higher in the -F file now describe the fields to be included as columns in the grid. C:\brag\...\brgrid.exe -B001 –Fclient_desc.txt -N10 -Wbrclient –ACCCCFF The contents of the source file (-F) is shown below. Notice lines 3+ are different. Cust#:70|Name:175|Address 1:150|Address 2:150|City:120|ST:40|MailCode:80 R|L|L|L|L|L|L C|1|6|S C|7|40|S C|47|30|S C|77|30|S C|107|20|S C|127|2|S C|129|10|S

17 Working with BR Internal Files. The -W switch causes the data to be read from the BR internal file. C:\brag\...\brgrid.exe -B001 –Fclient_desc.txt -N10 -Wbrclient –ACCCCFF

18 Pre-Sorting a Grid The -@ switch allows you to specify the direction and column number to be used to pre-sort the data for display. C:\brag\...\brgrid.exe -B001 –Fclient_desc.txt -N10 -Wbrclient –ACCCCFF -@A2

19 What is a filter? Finally, we discuss “filters”. By right clicking on the column heading of the column to be filtered, a filter screen is displayed. Enter a value and select the action to keep or remove the matching records. I will keep “chicago” in this example.

20 How is the appearance changed? The filtered results are shown below. Notice “North Chicago” remains. To select all records at this point, I have used Ctrl-A to select all and click “OK” to write the date to the result file. Notice the caption is altered to include “filtered”, the button text is in “red” and the record count is displayed in “red”.

21 Additional switches Left-clicking on a column heading will cause the grid to be sorted in ascending order, left-clicking again on the same column will cause the column to be sorted in descending order. Many other switches are provided for specific functions and are described in the documentation. In addition, you should refer to the common switch documentation manual which fully describes the switches that are common to all of the utilities Dixon and I have written.

22 Practical Workshop Exercise You previously created a BR program to select column headings from the census.csv file. Today we will build on that program. Using the column heading selection routine, create a source file (-F) that contains the selected column headings with the necessary formats. Additionally, read the data rows from the census.csv file and populate the file with the selected columns from the 5900 records. (For simplicity use left justified text for all columns in the grid) Display the file you have constructed to present the data in a grid with alternating background colors. The displayed data should be sorted by the last_name column which must be included in the selection process. Finally, for extra credit, add a button that would offer the ability to “Print” the selected rows by displaying a custom button. As a grand finale, use BRRegister to determine the location of your spreadsheet program (on your computer, you must know the name of the exe file that runs the software), and load the selected records from the result file in a spreadsheet.


Download ppt "External Executable Tools The Master's Touch David L. Blankenship."

Similar presentations


Ads by Google