rdlc子报表
错误: 无法显示子报表
Dim dts1 As dset
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cnn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("strcnn").ToString())
dts1 = New dset
Dim da As SqlDataAdapter = New SqlDataAdapter
da = New SqlDataAdapter("SELECT gc,dw from awo", cnn)
da.Fill(dts1, "lxb")
Dim rds As ReportDataSource = New ReportDataSource("dset_lxb", dts1.Tables("lxb"))
rvLxb.LocalReport.DataSources.Clear()
rvLxb.LocalReport.DataSources.Add(rds)
AddHandler rvLxb.LocalReport.SubreportProcessing, AddressOf Me.SubreportProcessingEventHandler
rvLxb.LocalReport.Refresh()
cnn.Close()
End Sub
Public Sub SubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
e.DataSources.Add(New ReportDataSource("dset_s_br", dts1.Tables("lxb")))
End Sub