Barbara265
Technical User
I'm using Crystal 6.0 and am trying to use a series of parameters in the SQL query to eliminate hard-coded dates. Here is a snippet of the query that has the dates...
... AND
((EComp.EmDateBeg <= '05/31/00' and EComp.EmDateEnd >= '05/31/00') OR (EComp.EmDateBeg <= '05/31/00' and EComp.EmDateEnd Is Null AND EEmploy.EeDateLastHire <= '05/31/00') OR
(EEmploy.EeDateLastHire > '05/31/00' AND EEmploy.EeDateLastHire = EComp.EmDateBeg)) AND...
I have created a parameter called Month1 that I linked to EComp.EmDateBeg through the Select Expert. When I replace the hard-coded date with
EComp."EmDateBeg" <= ? (the syntax Crystal creates through use of the Select Expert.) and run the report I get an ODBC error that says "COUNT field incorrect". Ulitmately what I need to do is replace all of the hard-coded dates with parameters, but I thought I would start with one and get it to work before I tried to change them all.
At this point, I'm not even sure if this will work. I have used parameters in a similar way in the past and have not had this error. Any insight will be appreciated.
... AND
((EComp.EmDateBeg <= '05/31/00' and EComp.EmDateEnd >= '05/31/00') OR (EComp.EmDateBeg <= '05/31/00' and EComp.EmDateEnd Is Null AND EEmploy.EeDateLastHire <= '05/31/00') OR
(EEmploy.EeDateLastHire > '05/31/00' AND EEmploy.EeDateLastHire = EComp.EmDateBeg)) AND...
I have created a parameter called Month1 that I linked to EComp.EmDateBeg through the Select Expert. When I replace the hard-coded date with
EComp."EmDateBeg" <= ? (the syntax Crystal creates through use of the Select Expert.) and run the report I get an ODBC error that says "COUNT field incorrect". Ulitmately what I need to do is replace all of the hard-coded dates with parameters, but I thought I would start with one and get it to work before I tried to change them all.
At this point, I'm not even sure if this will work. I have used parameters in a similar way in the past and have not had this error. Any insight will be appreciated.