报告部分与数据源不匹配 [英] Report section do not match data source
本文介绍了报告部分与数据源不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我执行以下源代码时,请帮我得到运行时错误报告部分与数据源不匹配"
sql命令是正确的,我已经检查过了.
Pls help me when i execute the below source code i get the run-time error "Report section do not match data source"
the sql command is correct and i have checked it.
If adoRs.State = 1 Then
adoRs.Close
End If
Dim strsql As String
strsql = "select x.b_no,x.dat,x.amt,y.bil_no,y.dat,y.p_id,y.qty,y.tot,z.p_id,z.p_nam,z.p_rate from m_bil x,bill_det y,sup_market z where x.b_no=y.bil_no and x.dat=y.dat and x.b_no=" & Text1.Text & " and x.dat=#" & CDate(str3) & "# and z.p_id=y.p_id"
Set adoRs = con.Execute(strsql)
With DataReport1
.DataMember = vbNullString
Set .DataSource = adoRs
.Caption = "Billing"
'Detail:
With .Sections("Section1").Controls
.Item("nam").DataField = adoRs.Fields(9).Name
.Item("qty").DataField = adoRs.Fields(6).Name
.Item("p_rate").DataField = adoRs.Fields(10).Name
.Item("amt").DataField = adoRs.Fields(7).Name
End With
'Header:
With .Sections("Section6").Controls
.Item("bil_no").DataField = adoRs.Fields(0).Name
.Item("dat").DataField = adoRs.Fields(1).Name
End With
'Footer
With .Sections("Section7").Controls
.Item("tot").DataField = adoRs.Fields(2).Name
End With
.Show
End With
Set adoRs = Nothing
推荐答案
检查此KB以获取解决方案
PRB:8570报告节与数据源不匹配 [
Check this KB for solution
PRB: 8570 Report Sections Do Not Match DataSource[^]
这篇关于报告部分与数据源不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文