I have created a report in crystal with two parameters fields called @From_date and @To_Date and they are both strings in Crytsal. How do I pass the parameters into this report. Stuff that has ' in front of it is stuff I was playing with to try and get it to work
Here is my code
Dim CrystalApp As New CRAXDRT.Application
Dim CrystalRpt As New CRAXDRT.Report
'Dim CPFromDate As New CRAXDRT.ParameterValueInfo
'Dim CPToDate As New CRAXDRT.ParameterValueInfo
Set CrystalApp = CreateObject("CrystalRunTime.Application"
Set CrystalRpt = CrystalApp.OpenReport("C:\Visual Basic\Chris\Reports\Chris.rpt"
CrystalRpt.ParameterFields.Add "@From_Date"
CrystalRpt.ParameterFields.Add "@To_Date"
'Set CPFromDate.parameterName = From_Date
'Set CPFromDate.ParameterValues = gFromDate
'Set CPToDate.parameterName = To_Date
'Set CPToDate.ParameterValues = gToDate
'Set CrystalRpt = CrystalApp.OpenReport(Me.ReportDirectory & Me.ReportName)
frmClientReport.crvClient.ReportSource = CrystalRpt
'CrystalRpt.RecordSelectionFormula = Me.WhereClause
frmClientReport.crvClient.ViewReport
Here is my code
Dim CrystalApp As New CRAXDRT.Application
Dim CrystalRpt As New CRAXDRT.Report
'Dim CPFromDate As New CRAXDRT.ParameterValueInfo
'Dim CPToDate As New CRAXDRT.ParameterValueInfo
Set CrystalApp = CreateObject("CrystalRunTime.Application"
Set CrystalRpt = CrystalApp.OpenReport("C:\Visual Basic\Chris\Reports\Chris.rpt"
CrystalRpt.ParameterFields.Add "@From_Date"
CrystalRpt.ParameterFields.Add "@To_Date"
'Set CPFromDate.parameterName = From_Date
'Set CPFromDate.ParameterValues = gFromDate
'Set CPToDate.parameterName = To_Date
'Set CPToDate.ParameterValues = gToDate
'Set CrystalRpt = CrystalApp.OpenReport(Me.ReportDirectory & Me.ReportName)
frmClientReport.crvClient.ReportSource = CrystalRpt
'CrystalRpt.RecordSelectionFormula = Me.WhereClause
frmClientReport.crvClient.ViewReport