Our next step
is to set up a Data Connection. Reporting Services can connect
with, and create the datasets it needs from, virtually any ODBC or OLE
DB-compliant data source (in addition to the obvious MSSQL Server and MSAS
data stores). .NET-based API's add the potential for other data
sources, assuming that you have a legacy, or otherwise eccentric, scenario on
your hands.

Let's set up
a Connection, and create a Dataset within our practice example.

1.
Select New Dataset in
the Dataset selector at the top of the Data tab, as depicted in Illustration
8.

As we
have noted in earlier articles in the MSSQL
Server 2000 Reporting Services series, we might have
constructed the above query using the Query Builder. Query Builder's
graphical tools are very helpful when we are unfamiliar with the database we
are querying, or if we are learning the syntax of SELECT queries.
Because it is more efficient to simply type the query into the SQL pane
of the Dataset dialog box, or in the Generic Query Designer, we
will take this route in many articles to conserve time and space. (Some queries
cannot be created through the Query Builder, due to complexity or other
complications, but the tool will serve many of us well, in most cases).

Click the
Run button (shown in Illustration 13, atop the query we have
constructed) to ascertain that the syntax is correct.

Illustration
13: Running the Query (Compact View, Run Button Circled)

As we can
see, the resulting datasetcontains a simple list of Vendor IDs,
together with the respective States in which they are located. We will
rely upon this dataset to populate our pie chart in the next section. The VendorIDs
will be counted to generate number of vendors in each State (or Category,
in chart property parlance), as we shall see.