My environment are- the report template has been installed in client machine
- crystal report client installed in client machine
I has found the following code from notes.net
’ The Crystal Report Viewer Control
Dim m_Viewer As Variant
Set m_Viewer = Source.GetObject(“Crystal Report Viewer Control”)
’ The application object
Set App = CreateObject(“CrystalRuntime.Application”)
’ Open the report (Template)
Set Rep = App.OpenReport(“c:\StoreTransactions.rpt”)
’ Pass the report to the viewer control
Set m_Viewer.ReportSource = Rep
'Enable Export
m_Viewer.EnableExportButton =1
’ View the report
m_Viewer.ViewReport
As the crystal report client has been installed in client machine, this mean I do not need to store the crystal report viewer in the document. So that the line
Set m_Viewer = Source.GetObject(“Crystal Report Viewer Control”)
is useless for me
I try to change it to
Set m_Viewer = CreateObject(“Crystal Report Viewer Control”)
It shows automation error. How can I modifty the code such that I can view the report via lotusscript