我用的是vb自己的报表设计器第一、代码基本如下:Private Sub Command1_Click()
On Error GoTo err_exit Dim str As String
Dim rs As New ADODB.Recordset
str = "select * from 查询" rs.Open str, dbconn, adOpenKeyset, , adCmdText
Call set_reports(det_report_frm, rs)
det_report_frm.Show
Exit Sub
err_exit:
MsgBox Err.Description
End SubPrivate Sub set_reports(dtr As DataReport, rs As ADODB.Recordset)
With dtr
Set .DataSource = rs
.Sections("section4").Controls.Item("label10").caption = "H" & rs("流水号")
End With
End Sub程序在我的机子上运行没问题,但发到别人机子上运行后会出现错误 "Application-defined or object-defined error"无法预览,不知道怎么回事.第二、怎样将报表的打印方式默认设为横向。谢谢,大家救救俺啊!!!!!
On Error GoTo err_exit Dim str As String
Dim rs As New ADODB.Recordset
str = "select * from 查询" rs.Open str, dbconn, adOpenKeyset, , adCmdText
Call set_reports(det_report_frm, rs)
det_report_frm.Show
Exit Sub
err_exit:
MsgBox Err.Description
End SubPrivate Sub set_reports(dtr As DataReport, rs As ADODB.Recordset)
With dtr
Set .DataSource = rs
.Sections("section4").Controls.Item("label10").caption = "H" & rs("流水号")
End With
End Sub程序在我的机子上运行没问题,但发到别人机子上运行后会出现错误 "Application-defined or object-defined error"无法预览,不知道怎么回事.第二、怎样将报表的打印方式默认设为横向。谢谢,大家救救俺啊!!!!!
2.http://community.csdn.net/Expert/topic/3303/3303891.xml?temp=.3814356