WaveyDavey
Programmer
I have imported my Crystal Report into the RDC in VB6 and followed the guidelines for converting from OCX to RDC. Everything is fine except for date ranges. I am applying them thus:
When I run the report, I get no records although there are some on the database (SQL Server 2000).
If I change the code thus:
I get 2 records on my report, assuming 1 record per day in January.
I can only assume that the date range format is incorrect.
The CR web site does not help.
Any help greatly appreciated.
Dave.
Code:
Dim vReport as CrystalReport1
Dim a as String
a = "{Table.DateField} in Date(2002,1,1) to Date(2002,1,31)"
vReport.RecordSelectionFormula=a
When I run the report, I get no records although there are some on the database (SQL Server 2000).
If I change the code thus:
Code:
a = "{Table.DateField} = Date(2002,1,1) or {Table.DateField} = Date(2002,1,31)"
I get 2 records on my report, assuming 1 record per day in January.
I can only assume that the date range format is incorrect.
The CR web site does not help.
Any help greatly appreciated.
Dave.