Need help with subreport in Crystal Reports
Posted on 2002-06-13
I want to change a formula in a subreport that is linked to a report I'm printing through VB. The code so far is:
CReport1.Connect = "DSN=EmployeeProduction;UID=sa;PWD=;DSQ=EmployeeProduction"
CReport1.Formulas(0) = "BegDate = '" & Format(txtBegDateReports.Text, "mm/dd/yy") & "'"
CReport1.Formulas(1) = "EndDate = '" & Format(txtEndDateReports.Text, "mm/dd/yy") & "'"
CReport1.ReportFileName = "\\kclockbox1\checkremit\custom reports\performance\operator.rpt"
CReport1.PrintFileType = crptCrystal
CReport1.Destination = crptToWindow
That all works fine, except the subreport. I want to change the date exactly like I do in the report, just in the subreport also. How can I do that?