Skip to main content

Create a Query or Select a Stored Procedure

  • 2 minutes to read

On this wizard page, you can choose which tables, views and/or stored procedures from your data source to display in the report.

wpf-report-wizard-create-query-page

Manage Custom Queries

When you need to shape the query data at data source level, you can create custom queries by expanding the Queries category and clicking the Plus button. This invokes the Query Builder where you can create complex queries by joining multiple tables, filtering, sorting and grouping their data, as well as calculating various aggregate functions.

wpf-designer-query-builder

You can also use the Query Builder to specify custom SQL. See Data Access Security to learn more about using this option.

Click the wpf-report-wizard-create-query-page-edit-button button to customize an existing query using the Query Builder.

Click the wpf-report-wizard-create-query-page-remove-button button to delete a query.

On finishing the wizard, each selected data item is included in a separate query.

wpf-report-wizard-create-query-page-result-field-list

Specify Master-Detail Relationships

Click Manage Relations to define master-detail relationships between two or more queries. In the invoked Master-Detail Relation Editor, you can create a new relationship by connecting the required key fields using drag and drop.

wpf-report-wizard-master-detail-relation-editor

To edit an existing relationship, double-click the corresponding arrow, or right-click it and select Edit Relation in the context menu. This invokes the Edit Relations editor that provides a different UI to manage the data relationships.

wpf-master-detail-relation-editor-edit-relation

On finishing the wizard, the provided data relationships appear in the Field List.

wpf-report-wizard-result-field-list-master-detail

Click Next to proceed to the next wizard page. You go to the Configure Query Parameters page if selected queries or stored procedures contain any parameters.

Otherwise, clicking Next opens the Choose Fields to Display in a Report page.