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

Multiple Date Parameters

Status
Not open for further replies.

SMosley804

Technical User
Oct 15, 2007
44
0
0
US
Crystal Reports Dev. v11
IBM DB2

I have a report where I need to give the client to select the date ranges in 2 different ways. The first way is a predefined date parameter:

{?Time Period}- the values are 'day', 'week','month', or 'year'

They also want to have the ability to select a customizable date range where they can go outside of the preset ranges.

{?Date}-is set as a range this should allow them to look outside the pre-defined dates.

My question is, Is there a way to have both parameters and have the selection formula ignore one or the other?

Any help is appreciated.
 
Can you explain how you have the first part set up? How does the selected time interval relate to the date parameter? Yes, this can be done.

-LB
 
The selected time interval doesn't necessarily relate to the date. The end-users just want to have the ability to select pre-defined ranges of dates that they can select quickly with out entering the range manually. They also want to be able to at times go out side of the pre-defined ranges and manually enter the specific ranges.

So when the client selects a pre-defined range the manual date range parameter should be ignored and vice versa.

FYI- There is 1 formula for each of the predeifined date ranges. day= {@Date}=currentdate-1, week={@Date}>= currentdate-7 and {@Date}<currentdate, month ={@Date}>= currentdate-30 and {@Date}<currentdate, year= ={@Date}>= currentdate-365 and {@Date}<currentdate

Selection Criteria is
{?Assigned Group} and select {?timeperiod}
case "day": {@Day}
case "week": {@Week}
case "month": {@Month}
case "year": {@Year}
 
Thanks. Change your parameter list options to include "customized range" formula to this:

{?Assigned Group} and
select {?timeperiod}
case "day": {@Day}
case "week": {@Week}
case "month": {@Month}
case "year": {@Year}
case "customized range" : {@Date} = {?Date}

They will still be prompted for {?Date}, but it will have no effect unless "customized range" is selected. You can add a default to {?Date} and then in the prompt text, say:

"If you selected "customized range" for {?timeperiod}, select a date range."

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top