OCLC Online Computer Library Center
Distributing ILLiad Reports
Created Using Microsoft Access
David Larsen
Head of Access Services University of Chicago Library
d-larsen@uchicago.edu
OCLC Online Computer Library Center
Or,
“Now that I’ve taken the Generating Reports in
OCLC ILLiad Class,
how do I get my reports to those who
need to see them?”
OCLC Online Computer Library Center
Why Distribute MS Access Queries and Reports?
Need to summarize and display data in ways that can’t be done through ILLiad client or web
reports.
Need to provide reports to those who don’t know how to use ILLiad or don’t have access to client.
Want to let individuals see data but not alter information in tables.
Want to automatically “push” information to
those who need it or allow them to “pull” it
themselves.
OCLC Online Computer Library Center
Two Approaches
1. Provide users with the actual MS Access “.mdb” files and a
simplified interface that allows reports to be run as needed without training in MS Access.
2. Schedule reports to be automatically
run and sent via email to interested
individuals.
OCLC Online Computer Library Center
Example of First Approach
ILLiad Borrowing Report
Provided to bibliographers
Shows loan requests for borrowing
Provides ability to specify academic
department and date range
OCLC Online Computer Library Center
When Borrowing Report is opened, users only see a simple form
with a drop-down menu, two text boxes, and two buttons.
OCLC Online Computer Library Center
Users can select department from a drop-down box that
displays a list generated from a dynamic ILLiad query.
OCLC Online Computer Library Center
Users can specify a date range or accept the default date
range (previous week).
OCLC Online Computer Library Center
Example of
Resulting Report
OCLC Online Computer Library Center
Reports can be sent to Excel, Word, or Printer.
OCLC Online Computer Library Center
Report Exported to Excel
OCLC Online Computer Library Center
Benefits of this Approach
Users can run reports at any time
Can export to Excel, HTML, or Rich Text
Can create interface that allows use by those untrained in MS Access or ILLiad
Users can choose from a wide range of
options using drop-down and text entry
boxes
OCLC Online Computer Library Center
Disadvantages of this Approach
Users need Microsoft Access
Need to set up ODBC connections on all machines that run reports
Firewalls may prevent access to ILLiad server
Underlying tables remain accessible to users with knowledge of Access
Configuring easy-to-use interface requires lots of time and skill
Users need to remember to run reports
OCLC Online Computer Library Center
Another Approach:
Schedule reports to automatically run
with results sent via email
OCLC Online Computer Library Center
Imagine opening your email each morning and
finding a half dozen ILLiad Reports in your Inbox
that summarize the previous day’s ILL activity.
OCLC Online Computer Library Center
Report for Acquisitions,
recommending purchase of items
that couldn’t be obtained through
ILL.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Report showing work
performed by
borrowing
staff.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Report showing work
performed
by lending
staff.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Report
showing
Direct
Request
activity.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Report
showing
users who
should no
longer be
blocked.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Report showing users who need to be charged fines for late
returns.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Benefits of This Approach
Users don't need to remember to run reports
Most find email a convenient way to receive information
Eliminates security and firewall concerns
Users don't need to have MS Access or configure ODBC settings
Don't need to spend lots of time simplifying MS Access interface
Reports can be scheduled to run during closed
times, reducing load on server
OCLC Online Computer Library Center
Disadvantages of This Approach
Recipients do not have control over report scheduling or content
Report criteria need to be configured in advance (no drop-downs or text entry boxes)
Need to consider privacy implications of
using email if reports contain sensitive
data
OCLC Online Computer Library Center
How to Schedule Reports to Automatically Run with
Results Sent via Email
OCLC Online Computer Library Center
Four Steps
1. Create MS Access queries and reports 2. Create MS Access macro to output
report as MS-DOS text.
3. Create batch file that runs macro and emails report using Blat, a free email utility.
4. Use Windows Task Scheduler to run
batch file at regularly specified times.
OCLC Online Computer Library Center
Step-by-Step Example
Creating, scheduling, and emailing
a report to Acquisitions recommending that the Library purchase recent
imprints that could not be obtained
through ILL
OCLC Online Computer Library Center
Step One
Create Microsoft Access queries and reports.
(Just like Stephanie Spires teaches in
Generating Reports in OCLC ILLiad)
OCLC Online Computer Library Center
Create a Microsoft Access File
OCLC Online Computer Library Center
Create a
“make table”
query that
outputs results to a table
called “ILL
Cancels”
OCLC Online Computer Library Center
This query produces a list of all borrowing loans from the past week with the
“Cancelled by ILL Staff” status, an imprint date in this millennium, and a “Reason for
Cancellation” matching the specified criteria.
OCLC Online Computer Library Center
Criteria for the “Reasons for Cancellation” field.
OCLC Online Computer Library Center
Complete SQL statement
for the query.
OCLC Online Computer Library Center
Create a report based on the
“ILL Cancels” table created
by the query.
OCLC Online Computer Library Center
Possible Report
Design
OCLC Online Computer Library Center
Avoid random blank lines by following the advice in Microsoft Knowledge Base Article 208436
(http://support.microsoft.com/kb/q208436/)
Set the Height property of a report's detail section to a value
divisible by .125 inches. For example, if the detail section's Height property contains a fractional number, set the fractional portion of this property value to one of the following decimal equivalents:
1\8 .125
1\4 .25
3\8 .375
1\2 .5
5\8 .625
3\4 .75
7\8 .875
Fraction
Decimal
Equivalent
OCLC Online Computer Library Center
Report
Preview
OCLC Online Computer Library Center
Step Two
Create Microsoft Access macro that will run report and output results
to a text file.
OCLC Online Computer Library Center
Create a new macro
called
“cancels”
OCLC Online Computer Library Center
Macro consists of four steps
that automate running of
query and output of report.
OCLC Online Computer Library Center
First Step: “SetWarnings” to “No”
This tells MS Access to suppress messages and warnings that would
typically require a user response.
OCLC Online Computer Library Center
Second Step: “OpenQuery”
This runs the “make table”
query we created.
OCLC Online Computer Library Center
Third Step: “OutputTo”
This outputs the “ILL Cancellations” report as an
MS-DOS text file named
“illcancels.txt” in the “c:\ill”
directory.
OCLC Online Computer Library Center
Third Step (Part Two):
Select the “Conditions” option under the “View” menu.
Then enter a logical condition that tells MS Access to only
output the report if the report contains data.
OCLC Online Computer Library Center
Fourth Step: “Quit”
Shuts down MS Access
at end of macro.
OCLC Online Computer Library Center
Macro is now
ready to run.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
The illcancels.txt file has been created.
OCLC Online Computer Library Center
Content of illcancels.txt
OCLC Online Computer Library Center
Running the macro a
second time will
produce a warning.
OCLC Online Computer Library Center
Even though the macro has been set to suppress system messages, it will not overwrite existing files.
This illcancels.txt file will need to be deleted
before running the macro.
OCLC Online Computer Library Center
Step Three
Create Batch File that runs macro and emails report using Blat, a free,
command-line, email utility.
OCLC Online Computer Library Center
Download Blat from www.blat.net.
OCLC Online Computer Library Center
Installing Blat
§ Place blat.exe, blat.dll, and blat.lib somewhere in your command path (e.g., c:\Windows)
§ At a Windows command prompt, type:
Blat -install <server addr> <sender's addr> [<try n times>
[<port> [<profile> [<username> [<password>]]]]]
(Values in square brackets that don’t apply to your situation can be replaced with “-”)
Example:
Blat –install smtp.uchicago.edu d-larsen@uchicago.edu - - - larsen
opensesame
OCLC Online Computer Library Center
Create a Text File
OCLC Online Computer Library Center
Give file a name with a “.bat”
or “.cmd” extension, which makes Windows treat it as an
executable “batch” or
“command” file containing a
series of Windows commands.
OCLC Online Computer Library Center
The first line will delete any
pre-existing illcancels.txt file,
using the “del” command.
OCLC Online Computer Library Center
The second line calls MS Access from the
command line, specifying the file to open and the
macro to run (designated by the “/x” switch).
OCLC Online Computer Library Center
The third line commands Blat to send the report
generated by the Access macro by email to the
specified recipients.
OCLC Online Computer Library Center
The batch file can be run by
double-clicking it.
OCLC Online Computer Library Center
Command window that opens when file is run.
OCLC Online Computer Library Center
Success! Batch file generated
report and emailed it.
OCLC Online Computer Library Center
Final Step
Use Windows Task Scheduler to run
batch file on a specified schedule.
OCLC Online Computer Library Center
Open “Scheduled Tasks” in
Windows Control Panel.
OCLC Online Computer Library Center
Choose “Add
Scheduled Task” and follow wizard to
schedule running
of batch file.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Use Browse to find batch file.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
Batch file will now run automatically at
specified time, as long as computer is running.
(It will run if you log off,
but not if you shut down.)
OCLC Online Computer Library Center
Scheduled tasks can be run manually by “right
mousing” and choosing the
“Run” command.
OCLC Online Computer Library Center
OCLC Online Computer Library Center
OCLC Online Computer Library Center
It works!
OCLC Online Computer Library Center