Discussion Locked

filtering data using Crystal Report ?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i have Query table i make it in Access97
and i want to print this query table in VB6
using Crystal Report so i can print all data in this table but i want to make filtering for date field in the query table
whith SelectionFormula property in Crystal report like : Between #1/4/2001# and #1/5/2001#
so what shoud i write in this property to
print just the data i want

3 replies

by vinnyd

I use a number of crystal reports that select by a date range.

This is what I use.

begindate = "Date(" + smyr + "," + smon + "," + sday + ")"
renddate = "Date(" + remyr + "," + remon + "," + reday + ")"

Report1.SelectionFormula = {service.datserv} in " + begindate + " to " + renddate

begindate and renddate puts the date into the proper format to use in the crystal formula.

{service.datserv} is the database or query field to filter by.

Try this and see if it works.

This discussion is closed to new replies.