PowerTools ActiveReports for .NET 11.0J
ConnectionString プロパティ (OleDBDataSource)
使用例 

OleDbデータプロバイダを使用するデータソースへの接続を開くために使用する文字列を表します。
構文
'宣言
 
Public Property ConnectionString As String
public string ConnectionString {get; set;}
使用例
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 = ((GrapeCity.ActiveReports.Data.OleDBDataSource)(this.DataSource)).ConnectionString;    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID;    
    rpt.DataSource = subDS;    
    ctlSubReport.Report = rpt;
}
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 = CType(Me.DataSource, GrapeCity.ActiveReports.Data.OleDBDataSource).ConnectionString    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID    rpt.DataSource = subDS    
    Me.ctlSubreport.Report = rpt 
End Sub
参照

関連項目

OleDBDataSource クラス
OleDBDataSource メンバ

 

 


©2003-2017 GrapeCity inc. All rights reserved.