Skip to main content
A newer version of this page is available. .

Data Source Wizard

  • 3 minutes to read

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.

snap-connect-to-data-add-new-data-source

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

snap-connect-to-data-add-new-data-source-report-explorer

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.

    Howto-Bind-Snap-Report-to-Data01

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

    Howto-Bind-Snap-Report-to-Data01a

  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.

    DataSourceWizard-03

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

    Howto-Bind-Snap-Report-to-Data02

    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.

    Howto-Bind-Snap-Report-to-Data03new

    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.

    Howto-Bind-Snap-Report-to-Data03anew

    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.

    Howto-Bind-Snap-Report-to-Data04new

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

Howto-Bind-Snap-Report-to-Data05new

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.

See Also