> Task 3: | Build a data set for the customer report

> In this procedure, you build a data set to indicate what data to extract from the Customers table. The customer report that you create later uses this data set.

> 1 | In Data Explorer, right-click Data Sets, and choose New Data Set.

> 2 | On New Data Set, type the following text for data set name:

> Customers

> 3 | Use the default values for the other fields.

> n | Data Source Selection shows the name of the data source that you created earlier.

> n | Data Set Type specifies that the data set uses a SQL SELECT query.

> 4 | Choose Next. Query displays the information to help you create a SQL query. The text area on the right side shows the required keywords of a SQL SELECT statement.

> 5 | In Available Items, expand CLASSICMODELS, then expand the Customers table. The columns in the Customers table appear.

> 6 | Use the following SQL SELECT statement to indicate what data to retrieve. You can type the column and table names, or you can drag them from Available Items to the appropriate location in the SELECT statement.

> SELECT Customers.customerName,
> Customers.customerNumber
> FROM Customers
> This statement that you created, which is shown in Figure 13‑2, gets values from the CUSTOMERNAME and CUSTOMERNUMBER columns in the Customers table.

> Figure 13‑2 | Query for Customers data set

> 7 | Choose Finish to save the data set. Edit Data Set displays the columns specified in the query, and provides options for editing the data set.

> 8 | Choose Preview Results to confirm that the query is valid and that it returns the correct data. If you created the SELECT statement correctly, you should see the results that appear in Figure 13‑3. These are the data rows that the data set returns.

> Figure 13‑3 | Data preview

> 9 | Choose OK to save the data set.

(c) Copyright Actuate Corporation 2009