Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Collapse]Snap
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamental Concepts
    [Expand]Graphical User Interface
     Supported Formats
    [Expand]Developer Guidelines
    [Collapse]Data Acquisition
      Data Source Wizard
      Snap Mail Merge
      Query Builder
      Master-Detail Relation
      Calculated Fields
      Parameters
    [Expand]Data Shaping
   [Expand]Examples
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Data Source Wizard

The Data Source Wizard in Snap allows your end-users to connect to many different data source types.

Tip

You can customize wizard pages as your needs dictate using the technique described in the How to: Customize the Data Source Wizard document.

To invoke the wizard, click Add New Data Source in the File menu.

Alternatively, you can right-click an empty area in the Data Explorer and click Add Data Source in the invoked context menu.

The Data Source Wizard is invoked. Proceed with the following steps in the wizard.

  1. On the first page of the invoked Data Source wizard, specify a name for the new data source and click Next.

  2. On the next page, select a data source type (Database) and click Next.

  3. If a data connection has already been specified in the application, the next wizard page allows you to select whether to use one of the existing connections, or create a new one.

  4. On the next page, select a data provider, specify the required connection settings and click Next.

    On this page, you can define a custom connection string, or select from the following supported data source types.

    • Microsoft SQL Server
    • Microsoft Access 97
    • Microsoft Access 2007
    • Microsoft SQL Server CE
    • Oracle
    • Amazon Redshift
    • Google BigQuery
    • Teradata
    • Firebird
    • IBM DB2
    • MySQL
    • Pervasive PSQL
    • PostgreSQL
    • SAP Sybase Advantage
    • SAP Sybase ASE
    • SAP Sybase SQL Anywhere
    • SQLite
    • VistaDB
    • VistaDB5
    • XML File

    Depending on the selected data provider, it may be necessary to specify additional connection options (such as authentication type and database name) on this page.

    To proceed to the next wizard page, click Next.

  5. On the next page, you are prompted to save the connection string including or excluding the user name and a password. Choose any option and click Next.

  6. This page allows you to select a query or a stored procedure.

    Click Run Query Builder... to invoke the Query Builder window.

    Important

    Manual SQL editing is not allowed by default. Enabling custom SQL queries may lead to inadvertent or unauthorized modifications to your data/database structure. Before you decide to allow manual SQL editing, we recommend you to follow best practices and implement the appropriate end-user read/write permissions at the database level.

    If for some reason you have to enable custom SQL editing, set the SnapControl.Options.DataSourceWizardOptions.SqlWizardSettings.EnableCustomSql option to true.

    Note that only SELECT statements are allowed in the text. To override this restriction, handle the SnapControl.ValidateCustomSql event.

  7. In the invoked Query Builder window, double-click the Categories item in the list of available tables on the left to add it to the tables included into the query.

    Enable the check box for the Categories table, to include all of its fields in the view.

    Click OK to close the Query Builder and return to the Data Source Wizard.

  8. When the query is ready, click Finish to save it.

After the data source has been added to the report, its data members and data fields are displayed in the Data Explorer.

Note

Only one data source at a time can be used in a mail merge operation. Snap does not join independent data sources automatically, so there are only two distinct scenarios available - merging all records from a single data source and a master-detail scenario. You are advised to combine data from different data sources and subsequently supply a joined data source to Snap.

Expanded See Also

How would you rate this topic?​​​​​​​