请教:有谁知道Reportviewer 制作子报表的.在下遇到困难了.
Dim adapter As New System.Data.SqlClient.SqlDataAdapter
Dim cmd As New System.Data.SqlClient.SqlCommand
Dim cmdstr As String = _
"select * from SendSubTicket where mainID in (select intID from SendMainTicket) "
cmd.Connection = GlobalBase.current.connection
cmd.CommandText = cmdstr
adapter.SelectCommand = cmd
adapter.Fill(Me.DsSendTicket1, "SendSubTicket ")
cmd.CommandText = "select * from SendMainTicket "
adapter.SelectCommand = cmd
adapter.Fill(Me.DsSendTicket1, "SendMainTicket ")
Me.SendSubTicketBindingSource.DataSource = Me.DsSendTicket1
Me.SendSubTicketBindingSource.DataMember = "SendSubTicket "
'主报表数据源
Me.SendMainTicketBindingSource.DataSource = Me.DsSendTicket1
Me.SendMainTicketBindingSource.DataMember = "SendMainTicket "
Dim streamRder As New System.IO.StreamReader( "E:\Soms.Net\Soms.Manager\Reports\SendsubTicket.rdlc ")
streamRder.ReadToEnd()
System.Diagnostics.Debug.Write(streamRder.ToString())
ReportViewer1.LocalReport.LoadSubreportDefinition( "SendsubTicket.rdlc ", streamRder)
Dim myReportDataSource1 As Microsoft.Reporting.WinForms.ReportDataSource = _
New Microsoft.Reporting.WinForms.ReportDataSource( _
"SendSubTicket ", Me.DsSendTicket1.Tables( "SendSubTicket "))