ComponentOne FlexReport for WinForms
ConnectionString Property

C1.Win.FlexReport.4 Assembly > C1.Win.FlexReport Namespace > DataSource Class : ConnectionString Property
Gets or sets the connection string used to open a database.
Syntax
'Declaration
 
Public Property ConnectionString As System.String
public System.string ConnectionString {get; set;}
Remarks

This property is used by the DataSource class to load the report data.

While ConnectionString specifies the database that contains the data, RecordSource specifies which table, stored procedure, or Sql command to use for retrieving the data.

The syntax of ConnectionString is determined by the type of the data provider used by DataSource. For example if DataProvider is DataProvider.OLEDB then ConnectionString should use syntax used in OleDbConnection, if DataProvider is DataProvider.XmlFile, it should contain the name of the XML file, and so on.

If you want to use a different type of connection (e.g. a System.Data.SqlClient.SqlConnection, or if your application already has the data available in a System.Data.DataTable object, you can assign the data directly to the Recordset property.

See Also

Reference

DataSource Class
DataSource Members