我的水晶报告中有子报告..我正在开发 vb.net Windows 窗体应用程序..我给出的代码如下:
Dim rpt As New DelivaryPerformance
Dim rpt1 As New DelParkingtype
Dim locid As Integer = RecordID("Locid", "Location_tbl", "LocName", CmbLocations.Text)
Dim cmdstatus As New SqlCommand("IBS_DelivaryStaus", con.connect)
cmdstatus.CommandType = CommandType.StoredProcedure
cmdstatus.Parameters.Add("@locid", SqlDbType.Int).Value = locid
da.SelectCommand = cmdstatus
da.Fill(ds)
If (ds.Tables(0).Rows.Count > 0) Then
rpt.SetDataSource(ds.Tables(0))
' CrystalReportViewer1.ReportSource = rpt
End If
Dim cmdparkingtype As New SqlCommand("IBS_Delivaryparkingtype", con.connect)
cmdparkingtype.CommandType = CommandType.StoredProcedure
cmdparkingtype.Parameters.Add("@locid", SqlDbType.Int).Value = locid
da.SelectCommand = cmdparkingtype
da.Fill(ds)
If (ds.Tables(0).Rows.Count > 0) Then
rpt1.SetDataSource(ds.Tables(0))
CrystalReportViewer1.ReportSource = rpt1
CrystalReportViewer1.ReportSource = rpt
End If
但它只加载我的DelivaryPerformance
报告……我怎么能把两个报告称为同一个查看器?任何人都知道请帮我找出这个问题