Creating a Chart with SQL 2000 Reporting Services - Configuring the DataSet
(Page 4 of 6 )
Once the connection is established, it is time to pull the data out. At this point a report may be added to the report project from the Solution explorer. Right click on the Project folder in the solution explorer and click on Add New Item..; that opens up the Report Projects categories, from which either a Report or a Report Wizard may be chosen.
In this case the ReportWizard was chosen, and a report named NetCharts.rdl file was added to the reports folder [for this tutorial an existing report project was used, and therefore a previous report is also seen in this picture]. At the same time a Report Wizard wakes up, offering guidance. The very first thing the Wizard configures is the data source, as shown in the next picture. The data source is accessed by scrolling the combo box, and the source configured earlier is chosen.

Each report in the reports folder is supported by three panes on which the report is configured: the Data, the Layout and the Preview. In the Data a New DataSet can be configured, or an existing Dataset can be edited. This dataset is not the same as the disconnected dataset of the System.Data.DataSet class. Clicking <New Dataset..> will bring up the next dialogue.

This is where the Dataset is to be configured.

Clicking on the dropdown will display options from which the information provided for the connection is chosen as shown. The only type for the CommandType is "Text." It is now necessry to code a sql select statement. For the present example, a select * from [Sheet1$] statement is used for the query. Note the absence of a query designer tool! Although several other items may be tuned on this dialogue, defaults are assumed. Later there will be an opportunity to peek at these options.

At this point the query may be run as shown, clicking on the !, and the result is displayed in the region below the query statement as shown.

The result of the above can be slightly modifed by altering the dataset[ and in fact creating a new dataset with a slightly altered query statement to produce an integers only column as follows. The point to note is that the query may be changed to suit your needs using applicable expressions, like the one shown in the next figure.

Next: Configuring the Layout >>
More MS SQL Server Articles
More By Jayaram Krishnaswamy