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!

Date Parameter Using LastFullWeek OR Date Range 1

Status
Not open for further replies.

jwrjwr54

Technical User
Apr 21, 2003
41
US
Afternoon all

Using Crystal XI Professional. I’m trying to create a date parameter that has the following options:

1 – LastFullWeek
2 – LastFullMonth
3 – Specify the Date Range

Some of my users would like to schedule the report and need the LFW and LFM options. Other users would like to select the data range. Can you have both in the same parameter?

If {?Date Parameter} = 1 then LastFullWeek else
If {?Date Parameter} = 2 then LastFullMonth else
??
 
You would have to add a parameter {?RangeType} with string options of: "Last Full Month", "Last Full Week", or "Specified Range". Then create a date range parameter {?DateRange} which allows range values. Then set up your record selection formula like this:

(
select {?RangeType}
case "Last Full Month" : {table.date} in lastfullmonth
case "Last Full Week" : {Table.date} in lastfullweek
case "Specified Range" : {table.date} = {?DateRange}
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top