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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date parameter for range

Status
Not open for further replies.

lauriesamh

Technical User
Sep 1, 2004
119
US
I'm using CR10 and working on a report where the user can select several parameters.

One of which is the user can select the reciept date to be between two dates or "All dates".

I've set a date parameter {?receipt Date} with a default date of 12/31/2199.

In the record selection I'm using
(
If not ({?receipt Date}<> date(12/31/2199)) then
{table.receipt_DT} in {?receipt Date}
Else if date(12/31/2199)={?receipt Date} then
True
)

So far I'm not getting any records returned when I should. Any help is appreciated.

 
Why use a double negative, also not sure if your use of Date() will work.

Try

(
If ?receipt Date} <> date(2199, 12, 31)) then
{table.receipt_DT} = {?receipt Date}
Else True
)

Ian
 
Ian,
Thanks it didn't work but I figured out a work around.

If isnull({?receipt Date}) then
{table.receipt_dt} in {?receipt Date}
Else {table.receipt_dt} in [CDate (1800, 01, 01) to currentdate]
)

I appreciate you're help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top