| A Query is a way to limit or
filter out the records that you don't want to see in a
report or a way to include just the information you do
want to see. The most often used and most often needed
queries are for Event reports. Most people don't
want to see every item on their Calendar. They want to
see just events that actually have an appointment time,
or they only want to see the events for one attorney.
Queries allow you to do this. We will create a
Query that limits a Short Format Calendar to
print only events that have a What code of Appointment.
Click on File|Reports|Events. You will see one of the
two following screens: |
 |
| If you see the first screen, Click
on the Report button. You will then see the second
screen. Scroll up or down until you see *Short Format
Calendar. Once it is highlighted Click OK. You will
then see the following screen: |
 |
| If you were to print this report
now, it would print all of the events in your Abacus
database. There are two ways to automatically limit
the amount of data you get. One is the Interval
or date range. This limits the report to that interval
of days. The other is the Who. This allows you
to limit the report to just one attorney or Who code.
Those two options are performing a function similar
to a Query but can't get any more specific than
that.
Click on the Query button.
You will then see a list of queries similar to the following
screen: |
 |
Click on Add. You will then see the
following screen: |
 |
Type in a Query ID. I doesn't
matter what you call it. It is generally best to call
the query something indicative of what it is.
Since this is a query to list just Appointments,
call the query APPT. A query name can
only be up to eight characters in length. You can also
give it a lengthier Description if you want.
It is not mandatory. Click on Add. You will then
see the Expression Editor: |
 |
Click on the down arrow next to Field.
You will then see a list of fields for Events.
Highlight What then click OK.
This will put What in the Fieldbox. (The What field
in an Event means just that, what is this Event?)
The Comparison =equals/starts with is the one we want
to use on this query (if this query was different
you could also click the down arrow next to it for other
choices).
The Value is word or string of letters that you are
looking for in the What field. In this case the word
you are looking for is APPT. It is important to note
that your value, in general, needs to be spelled EXACTLY
as it appears in the Event.
If you typed in Appointment in the value box and all
your Events had APPT in the What field, then the query
would say "No Records Found".
If you save this query now, it will print ALL
appointments (events with APPT in the What field). This
would include Done AND Not Done events.
If you wanted to further refine this query to
just Not Done appointments, click on Add again. You
will see a box asking how to combine the previous condition
(first line).
Click on And. You will then see the Expression
Editor again.
Click the down arrow next to field and highlight Status
(the Status field indicated the status of the event,
done or not done).
Click on OK. The Comparison will be the same as before
=equals/starts with.
The Value will be N Now the query looks like
this: |
 |
Click on OK.
You will then see your new query in the list
of Queries.
Click OK.
You will then see the Events Report Control screen again
and nextto the Query button it will say APPT.
Print this report to your screen and you will see only
appointments(events with APPT in the What field) that
have a Status of N (not done).
This is a simple query. You can make more complex
querieswith a little practice. |