Crystal Reports and crviewer.dll
Posted: Fri Aug 07, 2009 12:36 pm
by Andrew >> Thu, 19 Aug 2004 21:16:02 GMT
I'm trying to move away from using the crystl32.ocx to preview generated Crystal report, and start using the crviewer.dll.
It all looks very simple:
1. Obtain the Report object - report := RTLActiveX.openReport ("C:\Report.rpt", 1)
2. Assign the report to the Viewer - CRViewer.reportSource := report;
3. View it - CRViewer.viewReport;
Here's my problem. If I import crviewer.dll as a control through painter Jade informs me that it will not import the reportSource reference as it is a reference to an ActiveXInterface class, so I have no idea how to link the report to the ocx.
If I import the crviewer.dll as an AutomationControl, the reportSource reference is there, however assigning the report object appears to have no effect, that is, after the assignment the crviewer.reportSource reference is null, so the viewReport call does nothing.
Any ideas?
I'm trying to move away from using the crystl32.ocx to preview generated Crystal report, and start using the crviewer.dll.
It all looks very simple:
1. Obtain the Report object - report := RTLActiveX.openReport ("C:\Report.rpt", 1)
2. Assign the report to the Viewer - CRViewer.reportSource := report;
3. View it - CRViewer.viewReport;
Here's my problem. If I import crviewer.dll as a control through painter Jade informs me that it will not import the reportSource reference as it is a reference to an ActiveXInterface class, so I have no idea how to link the report to the ocx.
If I import the crviewer.dll as an AutomationControl, the reportSource reference is there, however assigning the report object appears to have no effect, that is, after the assignment the crviewer.reportSource reference is null, so the viewReport call does nothing.
Any ideas?