You can access the Report Data Source dialog from the Report Explorer by doing one of the following:
- Click the Add icon on the top left and select Data Source.
- Right-click the Data Sources node and select Add Data Source.
The Report Data Source dialog provides the following pages where you can set data source properties:
General
The General page of the Report Data Source dialog is where you can set the Name, Type and Connection string of a new data source, or choose to use a shared data source reference.
- In the Name field, you can enter a name for the data source. This name must be unique within the report. By default, the name is set to DataSource1.
- In the Shared Reference checkbox, you can select a shared data source reference. See Connect to a Data Source for further information. Once you have chosen the Shared Reference option, the Reference field to select a Shared Data Source becomes available.
- If the Shared Reference checkbox is clear, you can select a data source type from the Type dropdown field. ActiveReports supports the following providers:
- You can also select to execute datasets that use this data source in a single transaction by checking the Use Single Transaction checkbox.
- If you select SQL, OleDB, or Oracle as the data source Type value, the Connection Properties, Connection String and Advanced Settings pages appear under the Connection section. In other data source types, only the Connection String page appears.
Connection Properties
The Connection Properties page gives access to properties specific to the following data types.
SQL
- Server name: This field requires you to enter a server name.
- Log on to server: Through this field, you can select whether to use Windows authentication or server authentication which requires a user name and password
- Connect to a database: Through this field, you can select whether to enter a database name or attach a database file.
- Below this field you can also check the Save My Password option for future reference.
OleDB
- OLE DB Provider: This field requires you to select one among the list of OLE DB Providers provided in the drop down list.
- Enter a server or file name: This field requires you to enter a server or a file name along with its location.
- Log on to server: Through this field you can select whether to use Windows NT integrated security or use a specific user name and password.
Oracle
- Server name: This field requires you to enter a server name.
- Log on to server: This field requires you to enter a user name and a password for server authentication.
- Below this field you can also check the Save My Password option for future reference.
Connection String
Enter a connection string in the provided text box, or use the Connection Properties page to create one for SQL, OleDB, or Oracle data types.
Following is the sample connection string to access the Northwind database in the C directory:
Sample connection string |
Copy Code
|
provider=Microsoft.Jet.OLEDB.4.0;data source=c:\nwind.mdb;
|
Advanced Settings
The Advanced Settings page gives access to properties specific to each data type.
SQL
With the SQL data type, the Advanced Settings page gives access to the following properties:
- Application Name: Indicates the client application name.
- Auto Translate: Indicates whether the OEM/ANSI characters are converted. You can set this property to True or False. By default, the value is set to True. If True then SQLOLEDB performs the OEM/ANSI character conversion when multi-byte character strings are retrieved from, or sent to, the SQL Server.
- Current Language: Indicates the SQL Server language name. It also identifies the language used for system message selection and formatting. The language must be installed on the SQL Server, otherwise opening the connection will fail.
- Network Address: Indicates the network address of the SQL Server, specified by the Location property.
- Network Library: Indicates the name of the network library (DLL) used to communicate with the SQL Server. The name should not contain the path or the .dll file name extension. The default name is provided by the SQL Server client configuration.
- Packet Size: Indicates a network packet size in bytes. The Packet Size property value must be between 512 and 32767. By default, the SQLOLEDB network packet size is 4096.
- Trusted Connection: Indicates the user authentication mode. You can set this property to Yes or No. By default, the property value is set to No. If Yes, the SQLOLEDB uses the Microsoft Windows NT Authentication Mode to authorize user access to the SQL Server database, specified by the Location and Datasource property values. If this property is set to No, then the SQLOLEDB uses the Mixed mode to authorize user access to the SQL Server database. The SQL Server login and password are specified in the User Id and Password properties.
- Use Procedure for Prepare: Determines whether the SQL Server creates temporary stored procedures when Commands are prepared by the Prepared property.
- Workstation ID: Denotes a string that identifies the workstation.
OleDB
With the OleDB data type, the Advanced Settings page gives access to the Microsoft Jet OLEDB provider-specific connection parameters.
- Jet OLEDB: Compact Reclaimed Space Amount: Indicates an estimate of the amount of space, in bytes, that can be reclaimed by compacting the database. This value is only valid after a database connection has been established.
- Jet OLEDB: Connection Control: Indicates whether users can connect to the database.
- Jet OLEDB: Create System Database: Indicates whether to create a system database when creating a new data source.
- Jet OLEDB: Database Locking Mode: Indicates the locking mode for this database. The first user to open the database determines what mode to use when the database is open.
- Jet OLEDB: Database Password: Indicates the database password.
- Jet OLEDB: Don't Copy Locale on Compact: Indicates whether the Jet should copy locale information when compacting a database.
- Jet OLEDB: Encrypt Database: Indicates whether a compacted database should be encrypted. If this property is not set, the compacted database will be encrypted if the original database was encrypted.
- Jet OLEDB: Engine Type: Indicates the storage engine to access the current data store.
- Jet OLEDB: Exclusive Async Delay: Indicates the maximum length of time, in milliseconds, that the Jet can delay asynchronous writes to disk when the database is opened exclusively. This property is ignored unless Jet OLEDB: Flush Transaction Timeout is set to 0.
- Jet OLEDB: Flush Transaction Timeout: Indicates the amount of time before data stored in a cache for asynchronous writing is actually written to disk. This setting overrides the values for Jet OLEDB:Shared Async Delay and jet OLEDB: Exclusive Async Delay.
- Jet OLEDB: Global Bulk Transactions: Indicates whether the SQL bulk transactions are transacted.
- Jet OLEDB: Global Partial Bulk Ops: Indicates the password to open the database.
- Jet OLEDB: Implicit Commit Sync: Indicates whether the changes made in internal implicit transactions are written in synchronous or asynchronous mode.
- Jet OLEDB: Lock Delay: Indicates the number of milliseconds before attempting to acquire a lock after a previous attempt has failed.
- Jet OLEDB: Lock Retry: Indicates the frequency of attempts to access a locked page.
- Jet OLEDB: Max Buffer Size: Indicates the maximum amount memory, in kilobytes, the Jet can use before it starts flushing changes to disk.
- Jet OLEDB: MaxLocksPerFile: Indicates the maximum number of locks the Jet can place on a database. The default value is 9500.
- Jet OLEDB: New Database Password: Indicates the new password for this database. The old password is stored in Jet OLEDB: Database Password.
- Jet OLEDB: ODBC Command Time Out: Indicates the number of milliseconds before a remote ODBC query from the Jet will timeout.
- Jet OLEDB: Page Locks to Table Lock: Indicates how many pages to lock within a transaction before the Jet attempts to promote the lock to a table lock. If this value is 0, then the lock is never promoted.
- Jet OLEDB: Page Timeout: Indicates the number of milliseconds before the Jet will check if its cache is out of date with the database file.
- Jet OLEDB: Recycle Long-Valued Pages: Indicates whether the Jet should aggressively try to reclaim BLOB pages when they are freed.
- Jet OLEDB: Registry Path: Indicates the Windows registry key that contains values for the Jet database engine.
- Jet OLEDB: Reset ISAM Stats: Indicates whether the schema Recordset DBSCHEMA_JETOLEDB_ISAMSTATS should reset its performance counters after returning performance information.
- Jet OLEDB: Shared Async Delay: Indicates the maximum amount of time, in milliseconds, the Jet can delay asynchronous writes to disk when the database is opened in the multi-user mode.
- Jet OLEDB: System Database: Indicates the path and file name for the workgroup information file (system database).
- Jet OLEDB: Transaction Commit Mode: Indicates whether the Jet writes data to disk synchronously or asynchronously when a transaction is committed.
- Jet OLEDB: User Commit Sync: Indicates whether changes made in transactions are written in the synchronous or the asynchronous mode.
|
Note: You can see the description of each property at the bottom of the dialog when the property is selected. To provide more room for longer descriptions, drag the grab handle above the description. |
Credentials
The Credentials page gives you the following four options for the level of security you need for the data in your report.
Use Windows Authentication
Select this option when you know that any users with a valid Windows account are cleared for access to the data, and you do not want to prompt them for a user name and password.
Use a specific user name and password
Select this option when you want to allow only a single user name and password to access the data in the report.
Prompt for credentials
Select this option when there is a subset of users who can access the data. The Prompt string textbox allows you to customize the text requesting a user name and password from users.
No credentials
Select this option only if the data in the report is for general public consumption.
See Also