' I connected to a Crystal Report using:
Public Appn As New CRAXDRT.Application
Public cReport As New CRAXDRT.Report
Set Appn = CreateObject("CrystalRunTime.Application"
Set cReport = Appn.OpenReport(C:\Cost By Customer.rpt"
' Used CRViewer to view within VB:
CRViewerCustomer.ReportSource = cReport
cReport.ReadRecords
' & selected only records within gStartDate and gEndDate:
cReport.RecordSelectionFormula = "({qryCustomerCost.Date_Requested} >= #" & gStartDate & "#) and ({qryCustomerCost.Date_Requested} <= #" & gEndDate & "#) & ""
' Then viewed the report using:
CRViewerCustomer.ViewReport
Set cReport = Nothing
Set Appn = Nothing
Does anyone know how to pass the variables eg gStartDate into Crystal Reports for display there?? Note the 'Insert @UnboundDate' option seems only to be available when the report is embedded using Add Crysatal Reports 8,
Has anyone solved this??
any help appreciated
Connor
Public Appn As New CRAXDRT.Application
Public cReport As New CRAXDRT.Report
Set Appn = CreateObject("CrystalRunTime.Application"
Set cReport = Appn.OpenReport(C:\Cost By Customer.rpt"
' Used CRViewer to view within VB:
CRViewerCustomer.ReportSource = cReport
cReport.ReadRecords
' & selected only records within gStartDate and gEndDate:
cReport.RecordSelectionFormula = "({qryCustomerCost.Date_Requested} >= #" & gStartDate & "#) and ({qryCustomerCost.Date_Requested} <= #" & gEndDate & "#) & ""
' Then viewed the report using:
CRViewerCustomer.ViewReport
Set cReport = Nothing
Set Appn = Nothing
Does anyone know how to pass the variables eg gStartDate into Crystal Reports for display there?? Note the 'Insert @UnboundDate' option seems only to be available when the report is embedded using Add Crysatal Reports 8,
Has anyone solved this??
any help appreciated
Connor