When a user adds a new data source, the list of available connections in the Data Source Wizard is populated with connections defined in the application configuration file. This example demonstrates how to use a custom storage (a connectons.xml
) file to load and save Data Source Wizard connections. For this, implement the IConnectionStorageService and register it in the Report Designer component.
The CustomSqlDataConnection
class (the SqlDataConnection descendant) in this example holds the names displayed in the connection list.
Important: In this example, the connection string in the XML file is not encrypted and exposes sensitive information (a username and a password). You should protect the file storage to prevent unauthorized access in a real-world application.
- CustomConnectionStorageService.cs (VB: CustomConnectionStorageService.vb)
- CustomSqlDataConnection.cs (VB: CustomSqlDataConnection.vb)
- Form1.cs (VB: Form1.vb)
- Customize Data Connections in the Data Source Wizard (WinForms)
- Data Sources in Web End-User Report Designer (ASP.NET Core)
(you will be redirected to DevExpress.com to submit your response)