关于VB与水晶报表的问题
我想把VB中的adodc1作为水晶报表的数据源,我的代码如下:Dim Report As New CrystalReport1
Dim Rst As New ADODB.Recordset
Dim Crpt As New rpt1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Screen.MousePointer = vbDefault
Crpt.PaperSize = crPaperA4
Crpt.PaperOrientation = crPortrait
Crpt.Database.SetDataSource require2.Adodc1.Recordset
CRViewer1.ReportSource = Crpt
CRViewer1.ViewReport
End Sub
结果"Dim Crpt As New rpt1"显示:用户定义类型未定义.
这句是我从网上抄来的,怎么会有错?
其它的代码不知道对不对?