Browse DevX
Sign up for e-mail newsletters from DevX


Creating Custom Data Extensions for SQL Server 2000 Reporting Services : Page 2

Microsoft's SQL Server Reporting Services was created with extensibility in mind. Learn how to create your own custom data extensions to take advantage of this powerful new tool.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Figure 3. Dropdown List: The figure shows the data set selection drop down list.
Selecting Your Data
To create your report you must first query the data from your database. You do this in SQL Server Reporting Services by selecting New Dataset from the Dataset drop down combo box (see Figure 3). Selecting this option will activate the Data Source dialog box (see Figure 4) which you use to connect to your database. You can select from the various drivers that come with Reporting Services (SQL Server, Oracle, OLE DB, and ODBC). Here you'll also specify the login credentials that are required to connect to your database server.

Figure 4. Data Source Creation Dialog: Here's the dialog box with connection string parameters specified.
Figure 5. Generic Query Designer Icon: Here's the query designer icon.
After connecting to your database you can then create a query that will be sent to your database server. The easiest way to create a query is to use the Generic Query Designer that comes with SQL Server Reporting Services. To activate this dialog box you click the Generic Query Designer icon on the report designer toolbar (see Figure 5). This will activate a developer-friendly query designer. You can right-click in the query design surface (under the toolbar) and select Add Table... from the shortcut menu (see Figure 6). This will allow you to select the tables that you'll use for your query. Select the columns from your tables to show on your report. Figure 7 shows the query designer with a number of columns from the departments table selected. This table is found in the AdventureWorks sample database. Click the Run (!) command from the report designer toolbar to execute the query.

Figure 6. Generic Query Designer: The figure shows the designer with the right click menu visible.
Figure 7. Generic Query Designer: Here's the dialog box with the Departments table query options specified.
Figure 8. Visual Studio IDE: The figures shows the Visual Studio IDE with the report tabs highlighted.
Creating the Layout
Once you have created your query you can begin report layout. First, switch to Layout view. You will use the Toolbox and Fields tabs (see Figure 8). The Toolbox tab contains the various UI components (text boxes, labels, and so on) that you can drag and drop onto your report. The Fields tab contains the columns returned from your query. From the Toolbox tab select the Table object and drag one onto your report layout. Next, select the Fields tab and drag and drop the columns into the Detail area of the table object. Figure 9 shows the layout with the departmentid and name fields specified for the report. Once you have selected some columns from your query to display on your report you can preview it and later deploy it to your reporting server.

Figure 9. Report Layout Designer: The figure shows the designer containing a table object with fields from department query.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date