VB6 加载水晶报表例子

先按照水晶报表组件 Crystal Reports,Business Objects,现已被SAP收购。
再添加引用
'Library: CRAXDRT
'C:\Program Files\Business Objects\Common\3.5\bin\craxdrt.dll
'Crystal Reports ActiveX Designer Run Time Library 11.5

Dim Report As CRAXDRT.Report
Dim crApplication As New CRAXDRT.Application
Private Sub Form_Load()
Dim sFile As String
sFile = App.Path & "\Reports\test.rpt"
Set Report = crApplication.OpenReport(sFile)
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
猜你喜欢
  • 2021-11-20
  • 2021-10-23
  • 2022-12-23
  • 2021-04-08
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案