Skip to main content

Create a Query or Select a Stored Procedure

  • 2 minutes to read

Note

The default Report Designer implementation uses the Data Source Wizard (Fullscreen) version. To use the popup version instead, disable the ReportDesignerWizardSettings.UseFullscreenWizard option.

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

web-designer-report-wizard-02-select-queries-custom-query-context-menu

When you are required to shape the query data at the level of a data source, you can create custom queries by expanding the Queries category and clicking the web-designer-report-wizard-button-query-add button.

  • By default, custom SQL editing is disabled and clicking this button will invoke 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.
  • If custom SQL editing is enabled, this will invoke a context menu where you can choose whether to run the Query Builder or Custom SQL Editor.

    Important

    Enabling custom SQL in your web application exposes your databases to a risk of possible SQL injections. Before enabling this option, please make sure to apply a secure SQL validation that prevents execution of harmful requests. To learn more, see General Security Considerations.

To customize an existing query using the Query Builder, click the web-designer-report-wizard-button-query-edit button on this wizard page.

To delete a query, click the web-designer-report-wizard-button-query-delete button.

You can stop the wizard at this step by clicking Finish.

To continue report customization, select at least one item and click Next to proceed to the next wizard page.

  • If any custom queries and/or parameterized stored procedures are selected on this wizard page, you will be asked to customize parameters on the next wizard page: Configure Query Parameters.
  • If two or more tables and/or views are selected on this wizard page (and no custom queries), you will be asked to specify the data relationships on the next wizard page: Configure Master-Detail Relationships.

Note

When invoking the SQL Data Source Wizard to edit an existing data source, another version of this page is displayed.