Chapter Six: Expanding Access’ Capabilities Reports Reports are the final output of a database. They frequently contain summaries and statistical analysis directly from the queries section of Access. Reports can be designed to organize data and calculations in a printable format. Labels and text boxes can be added to explain data and calculations. The report wizard provides step-by-step instructions to create reports. As with forms, reorganization of fields and labels may be necessary (see resizing section in chapter five). The intrepid can go further: multiple queries can be summarized in a single report and charts can be embedded within a report. The chart wizard can be found by clicking New with the Reports tab selected. Storing GPS Coordinates If the resources are available, the addition of GPS coordinates to the PLEC Agrodiversity Database is highly recommended. Latitude (X) and longitude (Y) can be added on either the sample area or, now that the signal has been unscrambled, plot level. To add coordinates, simply create two new fields in either the Plot Description or Sample Areas table. The data type for the two fields should be Number, and the Field Size in the property box should be set to Single, allowing for decimals. Use the terms X and Y rather then latitude and longitude. The ArcView GIS program recognizes decimal degree coordinates as X for latitude and Y for longitude. Once the coordinates have been added to a table, the coordinate fields can be incorporated into queries. For instance, a query that calculates the Shannon and Mg index for each sample area can be linked to Access by adding X and Y coordinates to the query design. With the coordinates added to the query, the results can be linked to a GIS program and a visual representation of the data can be plotted on a map. This can be a powerful tool for both analysis and presentation. Linking to ArcView GIS A table or query that is linked from Access to a GIS program will be automatically updated when changes are made in Access. For example, if new species data are added under a sample area, the indices in the biodiversity index queries will 33 automatically be recalculated and any linked GIS tables will be adjusted. Many GIS programs have special functions that allow for links with Access tables and queries. Below are step-by-step instructions on how to link tables in Access to ArcView GIS2. As mentioned previously, ArcView GIS recognizes any fields labeled X and Y as latitude and longitude, respectively. Tables or queries linked to the GIS program should contain these two columns. Save the GIS Database from the CD onto the hard drive and then find the Indices query. This query calculates the Shannon and Mg indices for each sample area. To add the X and Y coordinates simply drag the two fields from the sample area table above the grid (see Chapter Four for more on using queries). Switch to datasheet view to see the change. Save the query and it is ready to be linked to ArcView GIS. Open the ArcView GIS project that will be linked to the Access query. From the main window, select the project menu in the top right. Then, from the Project options, select SQL Connect. The SQL Connect window should appear. Choose ‘MS Access 97 Database’ under ‘Connection:’ Next click on the ‘Connect’ box in the top right of the window. A new window should appear asking for the location of the database. Select the updated GIS Database. The Tables column of the SQL Connect window lists all of the tables and queries in the selected database. Scroll down the list to find the Indices query and double click on it. The Columns box to the right will display all of the available fields in the Indices query. From the choices, double click on ‘<All Columns>’ to include every column in the query. Give the new table a name in the box adjacent to the words Output Table. Finally, press the query button and the link is complete. The new table will be added to the list of tables in the project and can be plotted as an event theme. Demonstration Activity Database Demonstration activities are the major output of the PLEC project. Although discrete and/or quantitative data are not the focus of these activities, a database can be 2 It is beyond the scope of this manual to discuss how to use ArcView GIS and it is assumed that the programmer has knowledge of the ArcView GIS program. 34 created to aid in the recording of these events. Since some of the participants in demonstration activities, as well as the sites, may be included in the Agrodiversity Database, there are many opportunities for relationships with the agrodiversity database. The structure of a three-table addition is shown below: a. Participants table This table lists all the participants in demonstration activities along with some general information about each participant. The last three rows represent different demonstration activities with Yes denoting the activities in which the participant was present. The household column can be linked to the agrodiversity database. The ParticipantID is the primary key. PartcipantID Household Name Gender Age 1 2 3 DaSilva Santos Almeida Ze Maria Jamili Male 35 Female 59 Female 29 Community Activity 1 Activity 2 Activity 3 Mazagao Mazagao Ipixuna YES NO YES NO YES YES YES NO NO b. Expert farmer table The expert farmer table provides general information about the expert farmers. A more specific (text) description of the expertise of each expert farmer can be linked to this table. The household column can be linked to the agrobiodiverity database. The ExpertID is the primary key. ExpertID Household Name Gender Age Community Specialty 1 2 3 Rabelo Pinedo Gonzalez Jorge Sofia Miguel Male Female Male 57 45 32 Ipixuna Mazagao Ipixuna Agroforestry YES Forestry NO Inter-cropping NO Activity 1 Activity 2 Activity 3 NO YES NO NO NO YES c. Activities table Some general information about the specific activities can be recorded in the activities table. The sample area where the demonstration took place can be linked to the agrobiodiversity database via the Sample Area ID. The types of demonstration activities are included as separate columns. The date and the PLEC member recording the 35 information can also be recorded here. A more specific (text) description of each activity can be linked to this table. The ActivityID is the primary key. ActivityID Demonstrator Sample AreaID Working Session Group Disscusion Field Visit Training Session Date Recorder 1 2 3 Miguel Sofia Ze 12 24 7 YES NO YES YES YES YES YES NO YES YES YES YES 5/4/00 Jaime 9/7/00 Marcio 3/31/00 Marcio 36