'crBill是一用CR8.5 RDC设计的设计器(非rpt文件)Dim Report As New crBill
Dim rsBill as New ADODB.RecordsetPrivate Sub Form_Load()
  dim sql As String  Screen.MousePointer = vbHourglass  sql="Select * From Product Order By ProCode"
  rsBill.Open sql, cnSystem, adOpenStatic, adLockReadOnly, adCmdText  
  Report.Database.SetDataSource rsBill  '更新报表的数据源。
  CRViewer1.ReportSource = Report
  CRViewer1.EnableGroupTree = False
  CRViewer1.ViewReport
  
  Me.Top = 0
  Me.Left = 0  Screen.MousePointer = vbDefault
End SubPrivate Sub Form_Resize()
  CRViewer1.Top = 0
  CRViewer1.Left = 0
  CRViewer1.Height = ScaleHeight
  CRViewer1.Width = ScaleWidth
End SubPrivate Sub Form_Unload(Cancel As Integer)
  Set Report = Nothing
  rsBill.close
  set rsBill=Nothing
End Sub