我用的是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"无法预览,不知道怎么回事.第二、怎样将报表的打印方式默认设为横向。谢谢,大家救救俺啊!!!!!

解决方案 »

  1.   

    1.VB自帶的報表要一個相關的DLL支持才可以,你將應用程序打印發布一下吧,(應該是叫msdbrptr.dll)
    2.http://community.csdn.net/Expert/topic/3303/3303891.xml?temp=.3814356
      

  2.   

    发布是不是就把那dll拷到system32下就可以拉?
      

  3.   

    你用的是什么打包工具啊??用setupfactory的话只要把msdbrptr.dll添加进去打包就可以了2:在控制面板中有设置打印机在属性中找下有设置横向的