我在水晶报告中有一个子报告..我正在使用 vb.net
delParkingtype.rpt
我创建为子报告。然后我将此报告称为我的水晶报告查看器,如下所示:
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
da1.SelectCommand = cmdparkingtype
da1.Fill(ds1)
If (ds1.Tables(0).Rows.Count > 0) Then
rpt1.SetDataSource(ds1.Tables(0))
CrystalReportViewer1.ReportSource = rpt1
CrystalReportViewer1.ReportSource = rpt
End If
但
DelParkingtype 没有填写任何数据..我的代码有什么问题