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

Filter on Date Range....

Status
Not open for further replies.

marydn

Programmer
Mar 26, 2001
152
US
Can anyone tell me if it is possible to filter on a parameter that uses a date range? For example, if I want to filter all invoices between 8/1/2002 and 8/31/2002 is there anyone I can just use one parameter field that asks for a range versus having two parameter fields (one for start date and the other for end date).

Thanks So Much!!!!!!
 
To create a single range parameter, when you modify or create a parameter field, in the Options section of the window, check the Range value(s) radio button.

Naith
 
Naith,

I understand how to make the range parameter, but how do I use it in the select expert? I want to be able to say
Dates between 8/1/2002 and 8/31/2002 using the date values from the one parameter.

I currently have two parameters called Start and End. In the select expert I put:

{table.invoiceDate} in {?Start} to {?End}

I want the user to be able to make the slection in one parameter field instead of two. Is this possible?

Thanks!!!!!
 
Treat a range parameter like this in the record selection criteria:

{table.invoiceDate} >= minimum({?Period}) and
{table.invoiceDate} <= maximum({?Period})

Naith
 
Define a single parameter as &quot;Date&quot; type and check the &quot;Range Value(s)&quot; radio button. Example; if the parameter is called &quot;Period&quot; your formula will be as :

{table.invoiceDate} in minimum({?Period}) to Maximum({?Period})
 
Seems so simple now that I see it. It delieverd what I wanted. Thanks ya'll - you're the best!
 
You don't have to have it calc the min and max.


{table.invoiceDate} in {?Period} works just fine

Lisa
 
To answer Marydn's question, you cannot use the select expert to do this, the select expert is limited in this regard. You must write a record selection formula as suggested above.

Click on report, edit selection formula, record, and then enter the formula Lyanch suggusted. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top