scary queries laid to rest getting started with voyager prepackaged access reports presented by jean...

Post on 23-Dec-2015

216 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SCARY QUERIES LAID TO RESTSCARY QUERIES LAID TO REST

Getting Started with Voyager Prepackaged Access Reports

Presented by Jean Vik, Associate Library DirectorThe University of Texas at Dallas

McDermott LibraryELSUG October 2008

OverviewOverview

PC Setup Microsoft Access Prepackaged Reports

Why MS AccessWhy MS Access

Create queries & reports using a graphical interface

Prepackaged reports installed with clients– C:\Voyager\Access Reports\Reports.mdb

Customize prepackaged reports & queries Design new reports & queries

Microsoft AccessMicrosoft Access

Must have Microsoft Access installed Install reports.mdb

– Administrator privileges on PC a must– Part of Voyager client installation– Instructions found in Voyager® 6.5 Reporter

User’s Guide (p. 1_17)– These reports are not run through Reporter

PC SetupPC Setup Install and configure ODBC drivers

– Open Database Connectivity– Must match version of Oracle on server– Download from Ex Libris Support– Allows MS Access to communicate directly

with the Voyager database Uninstall old version of ODBC before

installing new one*

*See Voyager® Reporter User’s Guide for complete instructions.

Building Links to TablesBuilding Links to Tables Configure database links

– Go to C:\Voyager\Access Reports and click on the Reports.mdb file

– Access will open and reports: Database dialog box opens

a. Click the Forms button. b. Select Build database links to Voyager. c. Click the Open button.

Building Links to Tables in Building Links to Tables in Access 2003Access 2003

Access 2003 Forms Button

Building Links to Tables in Building Links to Tables in Access 2007Access 2007

Access 2007– Click down arrow

for menu– Choose Forms to

get to this view

Building Links to TablesBuilding Links to Tables

The first time the tables will fail to link

The word error! appears at the end of each table tried

Stops trying to link

Building Links to TablesBuilding Links to Tables

In earlier versions of Access choose

File>Get External Data> Link Tables

ReLinking TablesReLinking Tables Office 2007

– Ribbon– Database Tools– Linked Table

Manager– Select tables to be

updated Copy Reports.mdb

file to other pc’s

MS Access SecurityMS Access Security Set Security Level to

“Low” in 2003 Access 2007 has

added security Add path to your

Reports.mdb to the Trust Center to avoid this Security Alert

Click “Enable this content” to allow for one session

See “oracle9i_clientODBC.pdf for complete installation instructions.

Tables/Queries/ReportsTables/Queries/Reports

The down arrow on the left navigation pane allows switching between different categories:– Tables: show the linked Oracle tables– Queries: add specific criteria & build new

queries– Reports: built on top of a query to format data

for printing

Navigation PaneNavigation Pane

Access QueryAccess Query Right click a query and choose design view

to see the tables involved and how they are related

Query ResultQuery Result After running the query the results display in

tabular form Export to Excel to create a quick report

Data in ExcelData in Excel

Remove columns not needed in the report Sort

Access ReportAccess Report Running the report associated with this query

produces the same data nicely formatted for printing Cannot modify layout

Prepackaged Report HighlightsPrepackaged Report Highlights All prepackaged reports came from enhancement requests Limit results by adding Criteria

Prepackaged Query HighlightsPrepackaged Query Highlights

Acq: issues received by component and date range. This query uses a view table.

Creating Custom QueriesCreating Custom Queries First, make sure your report is not one of the

prepackaged reports! Decide which data elements should be included in

the report. Use the database dictionary to determine which

tables contain the required data. Create a new query in Access by adding these

tables. Other tables may be required for linking purposes.

Add the data elements from the tables and any criteria or restrictions.

Rules of ThumbRules of Thumb

Start small and save your queries frequently.

Make a copy of a query that has some of the elements you want & give it a new name.

First create the ‘core’ of your query, save it, then run it as a test.

Rules of Thumb Rules of Thumb

Looking at the prepackaged queries in design view is a good way to learn.

With practice, you will come to know the Voyager data structure and need to consult the printed tools less frequently.

Examine query results with a critical eye.

Example 1: Circulation asks for a Example 1: Circulation asks for a list of Community User Patronslist of Community User Patrons

What data elements should be included? Last name, first name, barcode, phone number

Is there a query that provides this information?

Check the Data Dictionary to determine which tables to use– Voyager® 6.5 Technical User’s Guide Appendix A

List of Community User PatronsList of Community User Patrons

What data elements should be in the query? Last name, first name, barcode, phone number

Look at tables beginning with PATRON to find where this stuff lives.– The PATRON table contains the LAST_NAME &

FIRST_NAME.

– The PATRON_BARCODE table contains PATRON_BARCODE.

– The PATRON_PHONE table contains PHONE_NUMBER.

Community User PatronsCommunity User Patrons We also need to include PATRON_ADDRESS for

linking purposes and PATRON_GROUP so we can just limit to Community User.

Community User PatronsCommunity User Patrons To add data, simply double click the elements in

the tables.

Note: Criteria in Access are case sensitive.

Example 2: List Vendors Example 2: List Vendors Ordered from this FYOrdered from this FY

Data to include: Vendor name, order date Check the Data Dictionary to see which

tables to use– The VENDOR table contains VENDOR_NAME.– The PURCHASE_ORDER table contains

PO_CREATE_DATE.

List of VendorsList of Vendors

Note: Enter criteria >9/1/2007 then Tab & Access adds correct formatting.

List of VendorsList of Vendors Get a count of orders placed with vendors

between a range of dates specified at the time the query is run & sort the vendor names alphabetically.

The Totals function (the ∑ button) allows the use of aggregate functions like “count”

Use the Sort dropdown to alphabetize by Vendor name

Count of Orders by VendorCount of Orders by Vendor

Example 3: Shelf List by LocationExample 3: Shelf List by Location

Data to include: call number, title, enumeration/chronology, barcode.

Sort by call # and then enumeration. Tables used for bibliographic queries:

BIB_TEXT, BIB_MASTER, BIB_MFHD, MFHD_MASTER, MFHD_ITEM, ITEM, LOCATION, ITEM_BARCODE

How are these tables related?How are these tables related?

Note: There are two intermediate tables for linking purposes: BIB_ MFHD and MFHD_ITEM. MFHD_ITEM can also be used to extract enumeration and chronology.

Shelf List by LocationShelf List by Location

Include both the NORMALIZED_CALL_NO field and the DISPLAY_CALL_NOField to get a correct sort of the Call Numbers

Voyager-L ReportsVoyager-L Reports

Email includes the SQL required for a report

Copy everything and paste it in a SQL view Change the view to Design View to see

which tables are used Modify criteria to match your local

locations, etc.

Questions?Questions?

Thank you and have a Happy Halloween!

top related