curtiscooper
New Member
I am trying to pass a dataset to the version 9 Crystal Viewer. I currently call the Crystal Viewer passing a rpt name to open like so:
CREATE 'CrystalRuntime.Report' chReport.
CREATE 'CrystalRuntime.Application' chApplication.
chReport = chApplication:OpenReport(cReportPath + prm-rpt).
chCtrlFrame:CrystalActiveXReportViewer:ReportSource = chReport.
/* View the report */
chCtrlFrame:CrystalActiveXReportViewer:ViewReport().
This works fine. However, the datasource is hardcoded in the rpt file, and I want to be able to pass a dataset.
I have heard of the use of the SetDataSource method, but I cannot find a sample of how it is used anywhere nor can I find it in the COM object viewer ...
Has anyone done this before or have a sample?
CREATE 'CrystalRuntime.Report' chReport.
CREATE 'CrystalRuntime.Application' chApplication.
chReport = chApplication:OpenReport(cReportPath + prm-rpt).
chCtrlFrame:CrystalActiveXReportViewer:ReportSource = chReport.
/* View the report */
chCtrlFrame:CrystalActiveXReportViewer:ViewReport().
This works fine. However, the datasource is hardcoded in the rpt file, and I want to be able to pass a dataset.
I have heard of the use of the SetDataSource method, but I cannot find a sample of how it is used anywhere nor can I find it in the COM object viewer ...
Has anyone done this before or have a sample?