FlexReport for .NET | ComponentOne
C1.FlexReport Assembly / C1.Report Namespace / DataSource Class / ConnectionString Property

In This Topic
    ConnectionString Property (DataSource)
    In This Topic
    Gets or sets the connection string used to open a database.
    Syntax
    'Declaration
     
    Public Property ConnectionString As String
    public 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. 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