你有邮箱吗?我可以将源文件发给您?
Dim strcmd As String
strcmd = "select tabxm.bsjdwname,Bsjdwdsjbgdsmyj.Bbsjdwsmyj,Bsjdwdsjbgdsmyj.Bbsjdwfzr,Bsjdwdsjbgdsmyj.cjrq from Bsjdwdsjbgdsmyj,tabxm where Bsjdwdsjbgdsmyj.xmname=tabxm.xmname" _
& " and Bsjdwdsjbgdsmyj.xmname='" & Me.cboxm.Text & "' and Bsjdwdsjbgdsmyj.mlname='" & Me.txtMLname.Text & "'"
Dim report As New CrptBsjdwdsjbgdsmyj
Dim dataset As New DsetBsjdwdsjbgdsmyj
Dim conn As New OleDbConnection
conn.ConnectionString = cls.conn
conn.Open()
Dim oledbapter As New OleDbDataAdapter(strcmd, conn)
oledbapter.Fill(dataset, "bjsdwdsjbgdsmyj")
report.SetDataSource(dataset)
Dim frtemp As New FrmPreview
frtemp.CryViewer.ReportSource = report
frtemp.Show()