ActiveReports Developer 7
ConnectionString Property
See Also  Example
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.Data Namespace > OleDBDataSource Class : ConnectionString Property

Glossary Item Box

Specifies the string used to open a connection to the data source using the OleDb data provider.

Syntax

Visual Basic (Declaration) 
Public Property ConnectionString As System.String
C# 
public System.string ConnectionString {get; set;}

Example

C#Copy Code
private void detail1_Format(object sender, System.EventArgs eArgs)
{    
    rptSubBM rpt = new rptSubBM();    
    GrapeCity.ActiveReports.Data.OleDBDataSource subDS = new GrapeCity.ActiveReports.Data.OleDBDataSource();    
    subDS.ConnectionString = this.ds.ConnectionString;    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID;    
    rpt.DataSource = subDS;    
    ctlSubReport.Report = rpt;
}
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
    Dim rpt As New rptSubBM()
    Dim subDS As New GrapeCity.ActiveReports.Data.OleDBDataSource()    
    subDS.ConnectionString = Me.ds.ConnectionString    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID    rpt.DataSource = subDS    
    Me.ctlSubreport.Report = rpt 
End Sub

See Also