Table of Contents
Part
1, Basic Setup and operation
Introduction
Design
Objective
General feature list
Getting and Installing DB2000
Getting a roster file
Importing a roster
Navigation, getting around
DB2000
Editing
Fields
Overview
of the Grids
Roster Grid
Dual Address Members
Affiliated Members
Grade Grid
History
Grid
Boat
Grid
Communications
Grid
User
Grid
Organization
Grid
Merit
Mark Grid
Cooperative
Submissions
Merit
Mark Files
Queries
Exporting
to other applications
Down
& Dirty Roster Printer
Roster
Mode
Mailing
Labels
Organization
Using
Tags
Part 2, Advanced Topics
Overview
Database Management
Making an Auxiliary Database
Spousal Record Crosscheck
Spouse Record Maintenance
User Grid
Data
Stuffer
Alternative
Newsletter Mailing List
Add-in Programs
OD-1
and OD-2 Form
HQ-102
Form
H-701
Form
Special
D/22 Data Collection Programs
Report Wizard
General
Characteristics
DB2000
User Defined Fields
RepWiz
User Designed Report Overview
1.
Making the Query
Simple
Query Example
Another
Example
Label
Making Query
2.
Making the Report
Define
Report Attributes
Sort
Out the Fields
Available Tools
Headers
and Footers
Images
in the Detail Area
Workshop Conclusion
J. Kenneth Guscott, Updated
September 17, 2005
Part
1, Basic Setup and operation
DB2000 and Report Wizard together comprise a special purpose database manager designed to assist squadron and district officers with duties involving membership, education, merit marks and communications. It was created by members of USPS National ITCOM, John Bradley (Report Wizard) and J. Kenneth Guscott, (DB2000).
Design Objective
To provide a database that can be personalized and used by USPS members that may find it useful in the pursuit of their USPS activities. To this end it is necessary that each user be able to update their database with information from HQ. Due to having only a single password, this idea has not always been understood by squadron management. In their desire to control what is uploaded to HQ, they find other ways to update their users. Some provide a completely new database periodically. Unfortunately this deprives the user of some of the programs most useful features, the ability to define and use new data fields, save database queries, keep page layouts etc. These are destroyed when the new database overwrites the current one. If there must be central control, it would be better to distribute the HQ roster file obtained via email so that each user can use the normal import utility.
Hopefully, this situation has been resolved. There are now three passwords each having different user rights. The lowest level, USER, allows downloading a roster but not uploading. This can be given to any member that needs to use DB2000. The next, UPDATER, allows the user to download and upload roster data. This will be used by the member(s) that is entrusted to maintain the database. The third, MASTER, in addition to download and upload rights, has administrator rights allowing changes to the passwords via the USPS web site.
Getting and Installing DB2000
The program is obtainable via the website www.accurecord.com/usps/outgoing/db2000.htm This URL can also be reached via the USPS web site from the ITCOM “Software Download” page.
This web page is specifically for DB2000 support from which can be downloaded the latest revisions and a lot of other useful stuff. The page has information on FAQ’s, common problems and workaround’s. Subscribing to the offered Email news service will alert users to new developments.
When installing for the first time, download the “Full Distribution” file, “DB2000R3.EXE”. If just updating, the update is available as a much smaller file, “DB2000V3.ZIP”. Download into an empty folder such as C:\Temp. Next, look for the “MQ Series Client” software further down the web page. There are two files, one for Windows 95, 98 and ME, one for Windows NT, 2000 and XP. Select and download the appropriate one.
Install MQ series first. The downloaded file is a self extracting archive. Execute it and then
Run the file “Setup.exe”. Note this file may not be in the root directory depending on the version being installed. IMPORTANT! When finished, reboot the computer.
Install DB2000: Execute downloaded file and it will extract into the folder in which it resides. Execute the file “Setup.exe” and follow the screen instructions. When installation is complete, run DB2000. Click the “Start” button and select district and squadron from the lists presented. This will set up an empty database specifically for the selection made. (Note: A user may have multiple databases from which DB2000 can select, e.g. squadron and district rosters.) Since the database is empty, the next thing to do is download and import a roster from HQ.
The HQ roster may be downloaded in two ways.
1. Direct downloading from the HQ computer. This is highly recommended.
2. By Email. In this case the HQ roster file is a self-extracting archive consisting of several files. Because many Email systems have filters that bar importation of .exe files, the extension has been changed to .ex_. The important thing to remember is that DB2000 users need do nothing with this file, except remember where it is saved. DB2000 will automatically extract the information it needs. Do not extract the files, DB2000 will not recognize them when separated from the archive. DB2000 will rename the file from *.ex_ to *.exe. DB2000 uses encryption to send and receive email data. The purpose of this is not so much for secrecy as to provide confidence that the files are authentic and were generated by legitimate USPS members.
If the “MQ Series Client” software is installed, the roster can be downloaded. First, open the “Authorization” dialog from the menu “Options/User Authorization”. Enter user’s certificate number and squadron password. Next, select menu Import/Download Roster. This will start the downloading process. DB2000 will try to go on line but depending on ISP and browser security settings, it may be necessary to go on line manually before this procedure can work.
If the “MQ Series Client” software is not available, then the email method may be used. Select menu Import/Request Roster from Website. If the user has an active ISP, DB2000 will go on line and connect to the appropriate page. The squadron authorization password, user certificate number and an email address is needed to get a copy. The first time this is tried, the database is empty and DB2000 will raise a message saying it can’t find certain data. Dismiss it by clicking “OK”, go on line and enter the data manually. For subsequent requests, make sure the authorization data is entered as described for MQ and that an email address exists, in the Comm grid, for the member given authorization. Thereafter, the roster request will be processed automatically without having to enter any data at the web site. Upon receiving the file via Email, save it into convenient folder where it can be easily located.
Importing the roster.
Whichever way the new roster was obtained, the next step is to import the file. If the roster was downloaded, a dialog will be presented asking if the user wishes to update now or later. If roster was via email, select “Import/Update with email Roster File”. Either way, the import dialog will be shown. There are several things to note about this form, mainly that the user has some discretion over what information is to be imported. The import rules are as follows:
Note: When a roster is imported into an empty database, the import options will have no effect. All records will be imported.
Caution: Improper use of the “Discretionary Import” check boxes has been the cause of user complaints that their database was not being correctly updated. Often this took the form “Our secretary uploaded some changes, but when I downloaded a new roster the changes were not made.” This was usually caused by one or more of the discretionary check boxes being cleared. DB2000 now checks all discretionary options by default. If the user un-checks an option, a help message is shown explaining the consequence. This help can be disabled if, after time, it proves to be annoying.
There are two ways of navigating around the screens in DB2000, the mouse and the keyboard. Since the program is largely word based the keyboard method may be preferred or perhaps a combination of both.
Single-Clicking a cell will select it. Double-Clicking the cell will open it for editing if the data in the cell is editable. If some other action is controlled by the cell, this will activate it. Double click again to close.
Use the arrow keys to select a specific cell, press Enter to open the cell for editing or taking action associated with the cell. Press Enter again to close.
The cell background changes color indicating status. White – not selected, cyan – selected and pink - editing mode.
NOTE: When a cell contains a list box, its contents can be scrolled with the arrow keys.
There are 57 data fields in the HQ roster file. Many of these are not editable in DB2000 because they are maintained exclusively by HQ. The others are maintained by the squadron. HQ prefers that DB2000 is used for keeping the HQ database current because the export file is used as received without need for re-keying the data. This eliminates the cause of many errors. Note: District users, using a district database, cannot export updated information to national. Squadron roster information can only be updated at the squadron level.
The fields are color coded in the grid headers. Editable HQ fields have green headers while non-editable fields have red headers. Other headers are yellow, these are fields used locally by DB2000 or the user. They may contain editable data, or have some other function.
DB2000 allows editing of authorized fields in several ways.
Editing in the grid view.
Use the arrow keys or mouse to select the cell to be edited. Get into the edit mode by either double clicking the mouse or pressing the Enter key. The cell will change color indicating that the edit mode is selected. After editing, return to normal mode by either double clicking the mouse or pressing the Enter key.
Abandon an edit by pressing the Esc key. The cell will then contain the information prior to entering the edit mode.
Editing using the BDU form.
From the roster grid the BDU form can be entered by clicking on the BDU button. This form allows data to be entered sequentially into a member’s record and is convenient when a large amount of editing is to be done. Tip: Select the member in the grid view first so the record will be pre-selected when the BDU form is opened. Also use the Tab key to move from field to field. Shift Tab will move backwards.
Note: While in the edit mode, right clicking the mouse will raise the Windows edit dialog which is fully functional and allows cut / copy / paste operations as in any other Windows application.
As mentioned above, to avoid information overload, DB2000’s data is presented in several grid views. The data is divided into related topics.
NOTE: On the main view there is a check box that allows affiliated members to be omitted from the grid views. This is handy if the user wants to deal with just squadron members.
Roster Grid
The roster grid contains the basic name and address
information, spouse information, birth date etc. The roster grid is the only
view that allows records to be deleted and affiliated members added.
Many squadrons have the problem of tracking dual address members. National’s database does not support this but DB2000 can support it locally using the following rules.
There are two columns in the roster grid, “DA” and “Swap”. To assign a member to dual address status, select the “DA” cell in the member’s row and press Enter. This will raise a dialog asking in which location to assign the current address. Make a selection and the cell content will reflect this with “H” for home or “A” for away. The grid can be toggled between the two by double-clicking or pressing Enter on the “Swap” cell. Alternate address information can be entered into the grid directly by editing the grid cells, or the BDU form may be used which will reflect the current location selected.
If, for any reason, the two locations get reversed, this can be corrected using the “<>” button at the top of the roster form. NOTE: This only exchanges the “H” and “A” labels, it does not exchange the address data on the grid.
Affiliated Members
The user may add anyone to the roster as an affiliated member. This is a handy way of including non squadron members in mail lists or for allowing merit mark recommendations to be made for other squadron personnel. To add a member, click on the “Affiliates” button to open the dialog. Click “New” to begin. The top row defines the affiliation and there is a list of suggestions. If the list does not contain a suitable description, type in whatever that is. If the field is left blank, DB2000 will define it as “Other” because the field must have an entry. When saving the record, a reminder message is displayed if there is no certificate number, squadron name or district. These are only needed for merit mark recommendations, so the message can be ignored if they are not needed.
TIP: Use some thought when assigning a name for an affiliation. Since the name can be used in a database query, it can be used to group affiliates by affiliation.
TIP: A new member can be added to the database as an affiliate. When he receives a certificate number in a roster update the affiliate label will be automatically removed as long as the name entered is identical. If not, there will be a duplicate record and the affiliate one must be manually removed.
The grade grid is a non-editable grid containing each member’s grade history. It also contains number of merit marks and senior / life membership status. Right clicking a record will show the members insignia.
If a member passes a course module, fields are dynamically added to display this information. These fields have names that indicate their content. For example; AP-000C for closed book, AP-000O for open book. These are placed at the right side of the grid initially, but the order in which the fields are displayed on this grid may be changed. This can be used to bring the grade cell and its associated module cells together.
The history grid is a non-editable grid containing each members USPS membership history. Certificate date, membership years, membership status etc. Double-Clicking or pressing Enter on a squadron cell will show the name of that squadron and its district.
The boat grid contains the three fields in the HQ roster and a number of other fields offered for keeping boat information.
This useful grid is communications central for the database. It contains all telephone, fax and Email address information. The Windows telephone dialer utility can be launched by clicking on the telephone number to dial. This utility may have to be set up to have it work smoothly with DB2000. In the case of Windows 2000 and XP, the dialer utility is not in the Windows folder. DB2000 will open a search dialog box to record the path information. It will be easier to use the Windows file search utility to find “Dialer.exe” and make a note of the path. Then select this path from the DB2000 dialog.
A member may be emailed by clicking on his email address in the grid and launching the Email client from the box at the top of the form.
The grid includes a field for Cell Phones. This is a local field not supported by HQ.
There is a method to bulk revise area codes. Making bulk area code changes is tricky because often not all numbers are included. When the telephone company splits an area code many numbers are unchanged while others are reassigned. To accommodate this type the new are code into text box provided, use the “Tag” feature to tag those to be changed, select grid column to be changed and click OK button. Repeat this for all affected columns. It’s a bit clunky but it beats changing them individually.
This grid shows information contained in user defined
fields. In also shows the information in two fields provide by HQ in the roster
download, Squad1 and Squad2. These were intended for squadron use
and can contain any squadron related data. Because these fields are in the
roster file and updated via the BDU they are public and should not be used for
personal data. Use them for an agreed upon squadron wide use. The “User” grid
also displays fields defined by the user. This
will be discussed further in “Workshop Notes Part 2, Advanced Topics”.
This grid is designed to show the squadron organization. Information is entered by clicking the Assign Jobs button. This opens a dialog which allows the user to assign a position to a selected member. There are lists defining the level, department, committee and position on the committee. Level defines Squadron, District or National. Department determines Bridge, Executive, Education etc. This then arranges that only appropriate committees appear in committee list and selecting committee or individual responsibility determines which positions are listed in position list. It is quite simple, though maybe a bit time consuming, to fill in the whole organization.
The user can define new committees in any department. To do this, click on Committees / Add to open a dialog. In this dialog select department and name the committee. From the check boxes select a suitable committee configuration and create the committee. Upon return to the organization grid, the new committee can be staffed by clicking Assign Jobs. The new committee will be found in whatever department it was placed. When staffed, it will appear in the organization grid and on printout of the D & D roster printer.
The organization grid can be arranged in several ways. When viewing structure it is useful to turn on the color and/or merge options to make grid easier to view. The grid may also be sorted by name showing how many jobs each member holds.
There are Tag options to tag various members of the
organization based on their positions. Tagging from these options allows lists
to be defined for printing, filling user defined fields or for export to other
applications. They can also be used for making email lists. Under the Reports
button the user may make an export file of the organization itself. This file,
in .csv format, is made in the order presented on the grid, either by committee
or by name. If this file is imported into Excel it makes a duplicate of
the DB2000 Organization grid. (See
exporting data and use of tags in following sections)
TIP: When changing or adding a job to a member already existing on the organization grid, highlight before selecting Assign Jobs. This way the member will already be selected in the name list.
TIP: If changing an existing assignment, the Find button can be used to cycle through all current assignments.
DB2000 is now preferred by HQ for merit mark submissions. Being able to use the data in the database makes it very easy for the user. Names, certificate numbers etc. will be correct and need not be typed in. While the help file for merit marks is in good shape, some users get confused when trying to print the various kinds of submissions. Because it uses the database, a tracking system was devised to keep the records categorized. This is shown in the “Status” column of the MM grid and is the key to the whole operation. Stepping through a typical MM cycle, the status is used as follows.
1. When a name is added to the grid, the “Status” column will read “No Data”
2. When the recommendation information data is added, the “Status” column will change to “No Recommendation”
3. After all of the recommendations have been entered, from the “Change Status” menu select “Mark all No Recommendation to Submittal”. All records with a “Submit” status can be printed only as an Original Submission.
4. When the results of the Original Submission are received, most will have been accepted while a few may have been rejected. From the “Change Status” menu select “Mark all Submit as Accepted” then go to the individual rejected records, double click the “Status” grid cell and select “Rejected” from the pop-up menu.
5. For those that will be resubmitted, edit the recommendation and from the “Status” cell menu select “Resubmit”. Records marked resubmit can now only be printed as a Re-submittal.
6. When the results are received, mark the individual records as “Accepted” or “Rejected”.
7. In the event that a Supplementary Submission needs to be made, first mark the record as “No Recommendation” then go back and mark it as “Supplementary”.
8. In the event that a Retroactive Submission needs to be made, first mark the record as “No Recommendation” then go back and mark it as “Retroactive”. When attempting to print this, the name of the appropriate submitting officer and year will have to be provided.
The status tracking system allows all recommendations to be displayed on the grid. The print utility will only print recommendations that have status appropriate to the submission requested. Records with “No Data”, “No recommendation”, “Accepted” or “Rejected” states cannot be printed.
Note that the “Change Status” menu contains several bulk change options to assist in rapid editing. This is helpful at the beginning of the next cycle. For example, last years submissions might be used as a starting point. Use the bulk change “Mark all as No recommendation” to reset everything. Then remove any members that should not be listed and add those that should.
DB2000 can accept files made by other members and assemble them for final submission. Squadron Chairpersons can make recommendations for their committees on DB2000 and save in a file. This file is sent to the MM Chairperson who can import it. If a member is already listed in the MM/Ch. list then if the length of the combined recommendations exceed that permitted, both records are displayed for editing. Otherwise DB2000 combines both records. Members not already in the MM/Ch list are added to it. The import MM file dialog offers several options. When doing coop input make sure import mode is “Append”.
There is a check box which offers the option of previewing the incoming data record by record. The existing and import data can be edited and combined in the preview mode.
There is another check box that will tag the new or changed records. It first deletes any existing tags. Now the MM/Ch can see the result of an import.
NOTE: For users of the “Boating Course Assistant”, BCA, program, a coop MM file can be made for each class and the resulting files can be emailed to the MM chairperson for inclusion in the squadron master MM list.
There are two kinds of MM file.
1. A current merit mark file that is maintained independent of the database. Any time the merit mark data is changed this file will be updated. The file is named “MMxxx.dat” where xxx is the squadron code. TIP: Some squadrons like to send an updated database to various members. If you copy over an existing database in this way you will lose your MM data. It can be restored by importing this file.
2. Merit mark data can also be stored as a dated file. When saved in this way it will reflect the data as of that date and will not be further updated by DB2000. This can be used to store the last submission data and is a useful starting point for the following year’s submission. Also, the file can be passed to another member if the MM task becomes someone else’s responsibility. This file is named “MMxxx_mmddyy.dat” by default.
Note: The name of the dated file can be changed if desired as long as the first part is retained, “MMxxx_”. E.g. If the user’s initials were “JKG”, the file could be named “MMxxx_JKG1.dat”, indicating to the MM/Ch who it came from. Or perhaps it could be named “MMxxx_ITCOM_04”, indicating the committee and year.
Querying the Database
The heart of database use is the ability to create reports based upon queries. It’s built in query generator is accessed under the “Reports” menu on the main screen. On the dialog screen the user can select from check boxes that are associated with various data fields. On clicking the “Find” button, the query is performed and the result shown in the list boxes. In the left text box is a list of members found. In the right text box the Structured Query Language, SQL, query that was generated.
To get access to user defined fields or to further refine a query, other criteria may be added in the dialog boxes provided. First, define a Logical Operator, AND, AND NOT, OR. Next select the field from the “Field Name” list. Next, define the Comparison Operator. =, <>, >, <, >=, <=, NULL, NOT NULL, LIKE, NOT LIKE. Lastly define the test “Criteria” which is user provided. Use the “Add” button to add to any selection made elsewhere on the query form.
While the user can generate useful queries knowing nothing of SQL, studying the structure of the queries will help the user use the Report Wizard’s much more advanced capability.
Useful queries can be saved for future use. E.g. the squadron mail list, or a list of course candidates. Remember that saved queries are dynamic. Each time used they will find the current list of potential candidates.
Upon completion of the query the user can call the printer or save the result for use with another applications.
TIP: Remember the check boxes “AND” / “OR” have logical inference that may sometimes seem counter intuitive. E.g. If “P” and “AP” course boxes are checked an AND result will list members that have both. An OR result will list those having either but not both.
After making a query, the user has the option of exporting the result as a CSV, comma separated value, file. Clicking the file option opens a grid form which displays all of the fields in the database including the user defined ones. The query determines the members included in the list but the user can determine which fields are to be included and in which order displayed.
Clicking in the column next to desired field adds it to the field list. The content of the field list can be reordered as necessary.
When selection is complete click Save and decide on a name and format for file. The default file extension is CSV but user can use TXT if desired. The content of the file is the same but the target application may interpret the content differently.
This built in report printer still has limited capability, but It has been upgraded to allow more flexible user control. All printing modes have a WYSIWYG data entry system so that each action user takes is instantly seen in the preview. Features common to all printing modes are:
· Selection of font face and size. This selection is used for entire report.
· Paper size: 8.5 X 11 or 5.5 X 8.5 (excepting label mode)
· Headers and footers (excepting label mode)
· Page layouts can be saved for each printing mode.
The record content in each printing mode, except organization, is built by the user from several options. Preformatted common items such as name/grade/rank, street address and city/state/zip: Any data field (database control fields are excluded) or user provided text. Multiple entries can be made on each row using the “Add” button. Entries can be undone for each row, last in first out. Punctuation of constant text labels may be added with user provided text.
Each mode, except label, may have a header and footer with several formatting options. Separator lines may be added. Preformatted date may be included in the footer. The date in a saved page remains as saved.
Roster Mode
In this mode, the record is built by the user for up to 6 rows. The roster can be printed on two paper sizes. Records per column is fixed. The 8.5 X 11 has 9 records per column and up to 3 columns. The 5.5 X 8.5 size has 6 records per column and one or two columns. If text overflows into the next column or overflows the page, it is shown in red on the screen view to alert user that some editing or page layout adjustments are needed.
Note: Many printers do not have a 5.5 X 8.5 paper size and some don’t have a user defined size, so the print routine just instructs the printer to print on 8.5 X 11 paper. Most printers will print on 5.5 X 8.5 stock without complaint, some may give a “text exceeds margin” message. If so, just ignore it.
Mailing Labels
Mailing labels can be printed on Avery 8160 label sheets. This mode has a very valuable feature. It can print labels starting at a selected location in order to use partially used label sheets. You can also print a single label at any sheet location.
A special font is no longer required for bar-coding address labels. These are now drawn graphically. NOTE: If bar-coding is selected, access to rows 4, 5 and 6 is prevented.
TIP: You can print labels that have nothing to do
with the underlying database by just entering every row as a text item. This
way you can print one or several “foreign” labels. However, never
forget that the underlying data for each label position is the database, so
don’t try to barcode because it will be that for the underlying record.
Organization
The D & D roster printer is the easiest way to print the organization structure of the squadron or district having several formatting options. Report Wizard is not currently able to do this. You can only print the organization if you have completed the necessary entries in the “ORG” grid.
Tab List
This new mode allows a list to be made using the method described above. It is built in row 1 only and each item added is placed in a new column. Column position is dynamically calculated from longest item in previous column. Column headers may be used if wanted with options for bold and underlining. The list may have single or double spaced lines.
This seemingly simple function is actually a very powerful tool, especially when it is used with user defined fields. Each major display grid has buttons that control tags:
TA Tag All
CA Clear All
IT Invert Tags
T Tag / Un-tag selected record. This is useful when tag column is not visible.
Email Found on the Communications and User grids only.
NOTE: On the main screen, there is a check box that allows viewing tagged records only in the grid views. This can be handy to allow sorting of tagged records which is not possible if other records are present
Example 1: We want to make an email list of certain members. First, go to the user grid create a Boolean, yes/no, user field. Next clear all tags (CA) and then tag each member required in the list. The tags may be set from any grid view, including Organization. In the user grid, select the new field column and using the Field Fill Options list select Tag to Yes/No Column and click OK. Now we have the user field filled with the member list.
To use it go to the user grid, click CA to clear existing tags, highlight the user field and click C2T then click Email. The email client will open with the “To” list filled. Type your email and send in the usual way.
NOTE: Only members with a valid email address will be posted to the client.
Under the “Options” menu on the main screen, there are two ways to treat email addresses posted to the client. The user may instruct DB2000 to post them direct. This option may limit the number that can be posted due to limitations in the operating system and email client. The other option is to paste the selection into the client. DB2000 places the list on the Windows Clipboard and user ca past with Ctrl V from the keyboard. Note, with this option addresses may be placed in “Copy” line also.
Example 2: Make an address listing for the squadron newsletter.
First make a user defined Boolean, yes/no, field. Name it “Add2Maillist” or something. The purpose of this field is to be able to include members that would otherwise be difficult to identify in a normal query. Go to the Query form and start a new query. From Member Type select Active All = yes, Additional Active = no and Affiliate All = yes. From the Order By list select ZIP. From Other Criteria select Logical Operator = OR, Field Name = “Add2Maillist” and Comparison Operator = TRUE and add to query. Make and save the query. Name it “News Letter” for example. From the User Grid tag any additional members required in the list. Move these to the user field with the Tag to Column feature.
To print your labels select Print Roster for the Reports menu in DB2000. Select Use Query and select your mail list query. When the printer opens set it to print mailing labels.
Example 3: When the phone company makes an area code it is a real nuisance to have to change each number individually. An easier way is to open the Comm grid and tag each record to be changed. Type the new area code in the box top right of screen. Highlight the phone number column and GO. It’s done!
TIP: If all or most numbers in an area code are to be changed it would be easier to make a query. From the Query form, from Other Criteria, select Logical Operator = AND, Field Name = “Phone”, Comparison Operator = LIKE and Criteria = 941*, the area code to be changed.
NOTE: the * in the query after the area code means “include all numbers starting with the area code”. Make the query and add to tags. Then un-tag any that are not to be changed.
Part 2, Advanced Topics Overview
Database management
DB2000 has a rigorous system of preserving data and will not easily allow the user to permanently lose data. The user needs to understand what is going on behind the scene to have confidence that the data is secure.
· Select a database. The databases for multiple squadrons and districts can be kept on and selected for use as required.
· Open a backup database.
· Exchange the primary database with a backup. This may be appropriate if there is a problem with a new import and user wants to restore previous data.
· Copy records from one database to another.
· Delete unwanted database files. DB2000 will not allow deletion of the primary working and backup files.
· Compare tagged records in the primary with those in a backup.
· Repair spousal record inconsistencies. See later section for example.
· Make auxiliary databases using Save As option. See below.
Making an Auxiliary Database
It may occur that a user enters a list of affiliated members into the database and would like other users to have the benefit of including them in their databases. One way to do this is to make an auxiliary database containing just these affiliated members. Here’s how.
After the affiliated members have been added do the following:
We now have a database “DBxxx_Affils” which can be distributed to all and sundry.
When received by a user, he will need to add the records to his own database.
7. Optional:
Select File\Delete Unwanted Database Files and delete “DBxxx_Affils”.
Spousal Record Crosscheck
One of the most common data errors in the HQ database are inconsistencies in spousal relationships. These have several causes, recent divorce or marriage, incomplete membership application form information, etc.
Since there are several fields involved, making these corrections manually is tedious, so DB2000 has an algorithm that repairs records with obvious errors. It flags other suspect records allowing the user to decide if data needs repair. It uses the following rules:
It uses two Boolean fields. "Partner", spouse exists if true. "Xcheck", a spouse crosscheck was performed and changes were made if true. If true, either will cause record to be skipped in a future crosscheck. If user edits the spouse certificate number, these variables are set false.
With member record, in following order check for a match. Find routine is exited as soon as a match is found.
1. Search for a member cert# matching "spouse cert#".
2. Search for a spouse cert# matching "member cert#".
3. Search for primary cert holder matching "member cert#".
4. Search for a cert# matching "primary cert holder"(if exists)
a. If no spouse is found, the spouse cert info is removed from the member record. Other spouse data, such as name, is left since such data may be valid if member's spouse is not a current member, or is not in the database.
b. If spouse is found then apply following rules.
If found by match method 1 or 2 then do a last name comparison and flag dissimilar for confirmation.
c. If found by match method 3 or 4 then present dialog for user confirmation. Remember that Primary certificate holder may have family members other than a spouse.
If confirmed see note below. If not, all spousal references are removed in both records.
NOTE: Primary Cert Holder field is protected and is never changed by DB2000.
d. All others are confirmed without intervening dialog. Both records are repaired as necessary and flagged as having been tested. They will not be retested if routine is run again or for the spouse record just confirmed.
NOTE: All changes affecting the BDU are added to upload list.
Spouse Record Maintenance
In the Roster Grid view, a button "Spouse" allows user to easily form or change existing relationships in one location. It ignores the previously tested flag, allowing complete access to all records. In the case in a full crosscheck a spouse find is rejected and the records stripped of all spousal association, this provides a way of establishing a correct relationship.
In addition to the two public user fields described in section one, the user can define any number of other fields of several data types. These are local to the user’s machine and can be used for any private purpose. However, the data can be shared with others by using Export User Defined Field in the Options Menu. This makes a data file that can be passed to other users. They can import it using Import User Defined Field. This automatically creates and fills the field.
To access user field options, click the Options button and select “Field Options”. In the resulting dialog form the user can define a new field, delete an unwanted field, change a name etc. Once a field is created it can be used as desired. The field can be of several types; text, numeric, currency, yes/no or memo. The length of a text field must be defined, 255 chars. max. A memo field can contain very long texts and formatting. Note: To close a memo field, a button is provided at the top of the screen. The Enter key cannot be used as with other fields since it is a legitimate formatting key in memo mode.
Data Stuffer
There is an option provided to fill a field with pre-selected data. Colloquially referred to as the “Data Stuffer”, these selections are primarily used to help in report preparation. For example, the primary database tables do not contain the squadron name. This must be derived from the squadron code field by cross referencing it to the HQ reference database. Report Wizard has no way to do this, so a user field containing this information solves the problem. The selection is provided to save user having to key the data. Other selections include lists of completed courses and various name/grade/rank formats.
TIP: Normally, names cannot be edited since they are exclusively maintained by HQ. However, if a user defined field is filled with names, these can be edited and used in both Report Wizard and the Down & Dirty Roster Printer.
Some user fields filled with the data stuffer are kept updated automatically. For example, course completions, ranks and grades in name fields. NOTE: The names in name fields are not automatically updated because they may have been edited by the user. However, new members will be added.
Alternative Newsletter Mailing List
The data stuffer offers another way of making a mailing list. From the stuffer list select Name: Mail List. The database will be searched for spousal relationships and will make a list with entries such as “John and Mary Boater”. The entry will appear on John’s row and Mary’s row will be blank. This is similar to selecting active members and rejecting additional-active members in a database query while having a less formal naming format. Since this field will be empty for many records, use the CA and C2T to tag the filled records and use the tags when making labels.
Add-In Programs
DB2000 has the capability of launching add-in programs. This was designed to allow other programmers to write useful utilities which can be started from DB2000 and share the databases. This is probably the way DB2000 will be expanded in future. Changes to the core program will mostly be limited to maintenance.
Currently several such programs are included or available.
An Add-in program for DB2000 which uses its database to provide much of the data required on the Historians Form. The program greatly simplifies making the report by letting the user fill in all of the member information from the DB2000 database. It can automatically search the database for statistics: Educational course completions, merit marks earned, new life members and such. It can also access the database used by the “Boating Course Assistant” program and extract number of students passed in the reporting period. Provision is made for all sections of the H-701 form. The user will still have to provide narrative for the various squadron activities and achievements.
This historian’s form is printed for submission to HQ. HQ cannot process it electronically at this time. Future electronic submission is under consideration
TIP: If entries are made into the Historians form as they occur, then it will be easier to complete it for submission. Also, it can then be printed at any time during the year for any supplementary reports that may be needed.
Add-in program providing information for the next change of watch list of officers. The data is obtained from the DB2000 database and stored until the COW. At the user’s discretion the data can be used to update the squadron/district organization after the COW date. The form can be printed for submission to HQ or it can be sent electronically via MQ Series Client or Email.
Add-in program for changing member status. Change of name, resignation or death is reported using this form. Its data is sent to HQ in exactly the same way as the BDU, uploading via MQ Series Client of Email. Note that the result of data changes made via this form will not appear in the DB2000 database until a new roster is downloaded.
Report Wizard
Report Wizard is capable of making very complex queries to the database and designing sophisticated report layouts. This is far beyond the capability of DB2000’s query generator and D&D Roster Printer.
Based upon the query and a more flexible data formatting capability it can make many kinds of reports.
It can include content other than database material:
A complete explanation of how to use it is beyond the scope of this document, but it is very worthwhile to learn. The following tips are just meant to get started. There is a help file for Report Wizard.
General RepWiz Characteristics
RepWiz has one limitation; it can only work with DB2000’s “Members” and “UserFields” tables, which it joins to make “EnhancedMembers”. The new table is a flat database containing most of each member’s data and has additional enhancements for treatment of dates. However it has no information concerning organizational structure which is contained in other DB2000 tables. To print organizational structure it is necessary to use DB2000’s Roster Printer or to export the data into a spreadsheet or word processor.
Also unavailable is data contained in the DB2000 reference database, such as “squadron name”. Some of this information can be provided by making user defined fields and putting the information into those.
Making columnar, tabular and labels is quite straightforward. Designing a customized report is a little more complex. It is based upon making a database query that describes the data content of the report.
DB2000 User Defined Fields
DB2000’s “User” grid can be very handy when using Report Wizard. Laying out multiple formats for a member’s name/rank/grade can be simplified using the “Data Stuffer” and selecting the name format desired. The “Data Stuffer” can also be used to list the courses a member has earned and this will simplify an otherwise complex query. See discussion in part 1 of these notes.
RepWiz User Designed Report Overview
1. Making the Query
For a new report, select “New Query” first to define the report’s content. The query is made in a programming language called SQL (Structured Query Language). RepWIz insulates the user from the syntax of the query, but it is still an advantage to know a little about it.
Most queries have the form:
SELECT Field list
FROM Table list
WHERE Field Criteria
ORDER BY Field list
In addition to listing the data fields required, the SELECT part can also format the content of these fields by using appropriate SQL statements. The WHERE part defines how the fields are to be used. The ORDER BY part the listing order which may be more that one field listed in order of precedent. In RepWiz the FROM part will always be “EnhancedMembers” since it is the only table available.
Simple Query Example:
Start a new query. From the field list top left of query generator dialog, double click “Last”, “First”, “Phone”, “OtherMember” adding them to the grid. The fields will appear in a grid side by side. Now each field has a number of properties that can be assigned in the grid rows.
Check the “Show SQL” check box to see the result so far.
SELECT [Last],[First],[Phone],[OtherMember]
FROM EnhancedMembers
Next define the WHERE part. Select the “OtherMember” column and right click the cell “Criteria” and select “Build”. A new dialog will appear with an assortment of command options. For this example select “IsNull” and IsNull([OtherMember]) will appear in message area. Click “OK” to accept and exit dialog. The SQL statement will now be:
SELECT [Last],[First],[Phone],[OtherMember]
FROM EnhancedMembers
WHERE ((IsNull([OtherMember])))
This action means that the list will contain members only and exclude affiliated members because members have no entry in the “OtherMember” field. Next, set up sort criteria. Select the “Last” column, click on “Sort” cell arrow and Select “ascending” from list. Repeat for the “First” column. The SQL statement will now be:
SELECT [Last],[First],[Phone],[OtherMember]
FROM EnhancedMembers
WHERE ((IsNull([OtherMember])))
ORDER BY [Last],[First]
There is one problem left. If a member has no phone the “Phone” field will contain “000 000-0000” in the database. These need to be excluded from the report and replaced with nothing. Select the “Phone” column, right click the column header and select “Expression”. In the resulting list select “IIf” from the command buttons. “IIf” means “if true do this if not do that”. It is similar to the conditional in Excel. In the message area see “IIf(<expression>,<true>,<false>)”.
Double click <expression> to highlight it. Select “Trim” and see IIf(Trim([Phone]),<true>,<false>)
Type in the wanted condition noting its exact location;
IIf(Trim([Phone])=”000 000-0000”,<true>,<false>)
Since this condition is the wanted one, next define the true part.
IIf(Trim([Phone])=”000 000-0000”,””,<false>)
Where “” is an empty string meaning nothing will be printed.
Next highlight the “<false>” part and select the “Trim” button again and see IIf(Trim([Phone])=”000 000-0000”,””,Trim([Phone]))
Lastly, because the data defined differs from that contained in the “Phone” field, a new field name must be assigned. In the “AS” box type “fPhone” and see;
IIf(Trim([Phone])=”000 000-0000”,””,Trim([Phone])) AS fPhone.
Exit dialog and In the query dialog notice that the SELECT line of the SQL statement now shows the new conditions. Click “Data View” button to see result.
Another useful data formatting example
In the database, zip codes are stored in the 5 + 4 form nnnnn-nnnn. Sometimes the last four digits are not known and are kept as 0000. If so, we don’t want to print the last 5 characters, “-0000”. Right click the column header “ZIP” and select “Expression”. From the command buttons select “IIf”. This is a logical test expression and the statement will show.
IIf(<expression>,<true>,<false>)
Double click the <expression> statement and select “Right” from command buttons and enter 5 in the query box. This selects the right 5 characters in the ZIP field. The expression is now: IIf(Right([ZIP],5),<true>,<false>)
Between the right parenthesis and comma type =”-0000”
IIf(Right([ZIP],5)=”-0000”,<true>,<false>)
Now the conditional part of the field, and its content have been defined. Next, double click on the “true” part of the expression. Select “Left” from the command list and 5 in the count dialog.
IIf(Right([ZIP],5)=”-0000”,Left([ZIP],5),<false>)
This means that if the last five characters of the zip code are “-0000” then print only the first five. Next, define the “false” part. Double click to select and select “Trim” form the command list.
IIf(Right([ZIP],5)=”-0000”,Left([ZIP],5),Trim([ZIP]))
Now the field must be renamed because although using data from the ZIP field it is no longer the same as the ZIP field. Into the text box to the right of the commands enter a name like fZIP.
IIf(Right([ZIP],5)=”-0000”,Left([ZIP],5),Trim([ZIP])) AS fZIP
That’s it! If these examples of formatting seem complex they are really only a few mouse clicks and key strokes. RepWiz takes care of the syntax.
Label Making Query
While nothing to do with User Designed Reports, it is sometimes necessary to make labels for a number of members but which number and name vary depending on circumstance. To make a general purpose query, start a new query in the usual way defining the necessary fields, but also include the “Tag” field.
In the criteria row for the tag field, make it [Tag] = TRUE. Also it’s a good idea to not show the Tag field in the query result. Turn off the box in the “Show” row.
Now to make the labels just tag each member needed in DB2000 and use the same query each time to make the labels.
2. Making the Report
After the query has been saved the next step is to make the report. From the menu select new report. From the resulting dialog select the type of report and name of the query it is to use. Select “Design a Report” and follow the on screen instructions until the report design page is displayed. There will be a number of horizontal bars dividing the page into Report Header, Page Header, Detail, Control total, Page Footer and Report Footer. In the detail part, the fields defined in the query will be displayed.
Define Report Attributes
At the top left of the grid is a “Bulls-eye” button. Click on this to display a list of report attributes and make an appropriate selection. Don’t worry about getting it right first time, attributes, such as offsets, can be changed later if need be.
Sort Out the Fields
Available Tools
Using these tools, arrange the fields as they should appear in the report. There’s nothing like practice to master this.
At any time the report may be previewed. Select Print/Preview from the menu. A printer dialog will appear the first time this is done. If the printer settings do not suit the report attributes selected, open the printer dialog and set up such things as paper size, orientation, printing one or two sided etc. This is a must, it affects the preview which takes direction from the printer settings.
When the preview appears the current status will be revealed. It will probably be necessary to flip back and forth between design and preview to optimize the layout. NOTE: To see each page in the report use the Page Up and Page Down keys.
Headers and Footers
The text in these areas is typed in by the user. In the Report Header section select the text box labeled “Report Main”, right click to raise its properties dialog. This provides many options for font, font size and text alignment. The bottom line of the grid is “Data”. Type here what is wanted in the text object. When returning to the design view, the bounding box will have to be sized and aligned manually. If another object is required in the header area, right click on the background and select from the popup menu.
NOTE 1: If a graphical object is added such as a squadron burgee, it is a good idea to copy the file to a sub-folder of DB2000. This way, it is less likely to get lost when doing general file management on the computer. E.g. With Windows Explorer select the folder DB2000v3 and make a new sub-folder Images. Put all graphic objects there. Also, although RepWiz can size the image, it is a good idea to optimize it for this purpose in an image editor to keep file size under control. In other words, don’t put a 5 mega-pixel photo and size it to 1 X 1 inches in RepWiz. Make a few kilobyte version of it instead.
NOTE 2: In the properties for headers and footers, the user may select if the area is to be displayed on every page.
Images in the Detail Area
A new feature of RepWiz allows unique images to be placed in each record. This could be a thumbnail portrait of the member, a picture of his boat, or both. To make this work, a user defined field must be made in DB2000. Make a text field with enough length to contain the image path, say 100. Make the images and put them into the image folder. For each record, where a picture is needed, type in the complete path to the image into the user field.
E.g. “C:\Program Files\DB2000v3\Images\FilthyScow.jpg”
WORKSHOP CONCLUSION
Considering the material covered, there is one theme that stands out. The importance of
DATABASE QUERIES,
USER DEFINED FIELDS,
TAG OPTIONS.
Used in combination they will usually provide a way to achieve a desired result. Understanding this will allow the user to get the most out of DB2000 and Report Wizard.
Ken Guscott 09/14/05