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

Use of alternate date ranges on records selections

Status
Not open for further replies.

HardlyWork

Programmer
Jan 3, 2006
7
US
Has anyone tried to select records based on a default date- range, unless an optional date-range exists on the same DATES table? CR9, Oracle 10g.

Any hints will be greatly appreciated.
 
You can use a parameter to choose between two different date ranges in a formula field. If you make it a boolian - no initial "If" - then you can test the boolian in selection.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
In 9.0, is there an automatic default to currentdate if the range parameter is not filled? If so, you can write a selection formula like:

if minimum({?daterange}) <> currentdate then
{table.date} in {?daterange} else
if minimum ({?daterange}) = currentdate then
{table.date} in date(2006,01,01) to date(2006,01,31) //substitute the default dates you would like

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top