Specify Data Source Settings (Database)
- 2 minutes to read
This page appears if you selected Database on the start page.
Choose a Data Connection
Select an item from the data connection list.
Choose Queries
Select tables, views and/or stored procedures to include them in a data source as separated queries.
Schema loading in Data Source Wizard is optimized; in other words, the schema is loaded on demand when nodes are expanded to display child elements. You can call the DevExpress.Analytics.Wizard.AutoQueryPreload function to load the entire schema at once.
You can also check specific data fields.
To join multiple data tables and shape resulting data, click the Queries category’s plus button to invoke the Query Builder and create a custom query.
If you enabled custom SQL queries, the plus button invokes a context menu. You can choose whether to run the Query Builder or Custom SQL Editor.
Important
Enable custom SQL queries only if you trust your users and environment. Make sure that you provide secure query validation to protect your database. See General Security Considerations for more information.
You can click the button to customize the query or the button to remove the query.
Once you click Finish and quit the wizard, the data source appears in the Report Explorer‘s Data Sources node. The Field List reflects the data source structure.
Configure Master-Detail Relationships
This step appears when you select two or more queries.
To create a master-detail relationship, click the master table’s plus button, select the detail table in the invoked list, and connect the key fields.
After the wizard is completed, the Field List reflects the master-detail hierarchy.
Configure Query Parameters
This step appears when you select a parameterized stored procedure or create a custom query.
Select a query and click the plus button to add a new parameter.
Click the button to customize the parameter or the button to remove it.
Use the following approaches to specify a parameter value:
Assign a static value
Select a query parameter’s type from the Type drop-down list and specify a value based on the selected type.
Provide a dynamic parameter value
Set the Type option to Expression and specify the Result Type. Click the Value option’s ellipsis button and construct an expression in the invoked Expression Editor.
If you design the current report in the wizard, you can map a query parameter to an existing report parameter. To do this, use the ?parameterName syntax.