I allow the user to key in the "date range"/"month" + name in vb, then pass the selectionformula to the crystal report designed.
For example1: name = KEN, a = 2003, 12, 31 , b = 2003, 01, 31
then the report will print out the customer name equal to KEN and transaction during the period.

For example2: name = Steven, m = 2
then the report will print out the customer name equal to Steven and transaction during February.

Anyone can help? :)

MKoslof

04-16-2004, 06:27 PM

Are you running this from VB? I assume so, NOT from Crystal reports, try this instead:

Also, are you using Access, if so,use #'s around your Dates.

The Date() and ToDate() parameters are native Crystal functions. If you are using the Active X Crystal Design and Runtime library (CRAXDRT), this should work:

Well. sir, :) Yes.I running this from VB6.0. I also using the Access. And I did set my crystal report's database connection to ADO. Yes, And I using the Active X Crystal Design Library(CRAXDRT). But the coding is not work.

MSGBOX show that--> {ChuHuo.Name} = 'ken' AND {ChuHuo.Date} BETWEEN #1/1/2003# AND #2/1/2004#

Not matter how, Thanks for your help, sir. :)

MKoslof

04-19-2004, 06:30 AM

If you are using ADO, your tables might be aliased automatically. If you open your report in design view and look at the fields, do they say {ADO.Name}, {ADO.field1}, etc? If so, you need to reference the current name of the table as assigned by Crystal. So: