Customize the Query

<< Click to Display Table of Contents >>

Navigation:  User Interface Reference > Report Designer > Report Designer for WinForms > Report Wizard > Data-bound Report Wizard > Connect to a Database >

Customize the Query

Interface Elements for Desktop > Report Designer > Report Designer for WinForms > Report Wizard > Data-bound Report Wizard > Connect to a Database > Customize the Query

Note

This wizard step appears only if you're creating a new report from scratch. In this instance, familiarity with database connections is required, so we recommend that you contact your application administrator or vendor for assistance. If you're modifying an existing report, this step will not appear and you will start with the Choose Columns to Display in Your Report wizard page.

ExpandedCollapsed Purpose

On this page, you can construct an SQL query to obtain data from the database, or select a stored procedure.

Query

Stored Procedure

ExpandedCollapsed Query

To construct an SQL query, do the following.

1.Click the Run Query Builder... button.

img23777

2.In the invoked Query Builder window, select an item from the list of available tables on the left and drop it onto the list of data tables to be used.

img23779

It is only possible to select a single table using the Query Builder. When creating a master-detail report, add the master table first.

3.Enable the check box near the added table to include all of its fields in the data view.

img23780

To assign a custom name to the selected data column, specify its Alias in the column list displayed under the data source editor. You can also apply sorting, grouping, filtering and aggregate functions to incoming data.

Click OK to exit the Query Builder

Click Next to proceed to the next wizard page: Choose Columns to Display in Your Report.

ExpandedCollapsed Stored Procedure

To use a stored procedure, do the following.

1.Select a stored procedure from the list of the available stored procedures and click Next.

img23781

2.Configure the parameters to be passed to the selected stored procedure. Make sure that the value of the passed parameter's Type property corresponds to the actual type the stored procedure parameter.

img23782

Click Next to proceed to the next wizard page: Choose Columns to Display in Your Report.

Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.

Send Feedback on this topic to DevExpress.