
Passing date to crystal report..or better way
Quote:
> I am trying to do a very simple task...to pass a user define date
to
> the crystal report so that the report can query something like TDATE
= "user
> define date"..but I can't! :-(
You might want to look at the part where I pass the formulas
(formulae?):
' Pass the Report name
crReport01.ReportFileName = msLocation & "prem_dtl.rpt"
' Report sorting order
If optEmpId Then
crReport01.SortFields(0) = "+{ReportingTable.IdentityNumber}"
crReport01.SortFields(1) = "+{ReportingTable.DependentCode}"
Else
crReport01.SortFields(0) = "+{Members.SurName}"
crReport01.SortFields(1) = "+{Members.FirstName}"
End If
' Pass the Report formulas
crReport01.Formulas(0) = "ProcDateString= '" & msProcDate & "'"
crReport01.Formulas(1) = "TextPrevTotal= " & Format$(nPrevTotal,
"0.00")
sRptName = "Detailed Premium Changes Report" & msTest
crReport01.Formulas(2) = "ReportName= '" & sRptName & "'"
Good luck,
Larry Fee
Systems Division, Corporate and Strategic Programs
Ministry of Health, Victoria BC Canada
Phone: (250) 952-1413 Fax..: (250) 952-2308