Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection formula - Date problem

Status
Not open for further replies.

Crasher

Programmer
Jun 7, 2000
4
AU
I'm trying to display a report based on a date range, the syntax is:

rpt.SelectionFormula = &quot;{Barrier_Test.Date} >= #&quot; & getFromDate & &quot;# And {Barrier_Test.Date} <= #&quot; & getToDate & &quot;# and {Barrier_Test.Type} = 'O'&quot;

this selection formula causes an error

Error in formula <Record_Selection>.
'{Barrier_Test.date} >= #28/03/2001 And {Barrier_Test.Date} <= #07/12/2001#
A number, currency amount, boolean or string is expected here.

Can someone help here please.

TIA
Crasher
 
I couldn't understand the tokens getFromDate and getToDate.
Are they your report parameters?
 
the error means is was exepcting a number, currency, boolean or stinrg and got someting else.

Check the data type of all your data elements for a type mismatch Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 


If this is an exact copy of your code then you are missing a # after the first date

'{Barrier_Test.date} >= #28/03/2001 And {Barrier_Test.Date} <= #07/12/2001#

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top