by Jimmy_ (3 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Print a crystal report in a certain date range
report.ReportFileName = gvPath & "\cheques.rpt"
report.CopiesToPrinter = InputBox("How many copies would you like to print")
report.SelectionFormula = "{cheques.date} in Date (" & Format$(Startdatetextbox.Value, "yyyy,mm,dd") & ") to Date (" & Format$(enddatetextbox.Value, "yyyy,mm,dd") & ")"
report.ReportTitle = "Report between" & " " & Format$(Startdatetextbox.Value, "long date") & " " & "and" & " " & Format(enddatetextbox.Value, "long date")
report.Action = 1