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

Date Range Parameters

Status
Not open for further replies.

trafficstudent

Programmer
Oct 21, 2005
106
US
I'm prompting my user with (2) parameters in the crystal (v9) report I just built. The (2) parameters that prompt the user are products then a search date. One of my Users requested that if they entered a product they don;t want to use the other parameter (date) what they would like to see is the lowest date possible. in this case it would be from back in 2002. How can i configure my parameters so that if my user only wants to select the product and for all dates (no range) can i put it in.

example of code:
{LaborDistribution.PartNumber} = {?Part Number Selection} and
not ({WorkCenters.WorkCenterID} startswith "9") and
{LaborDistribution.StartDate} <> {LaborDistribution.StopDate} and
{WOHeader.StartDate} = {?Date Range}
 
You can give a parameter a default value, such as s minimum date. If it is the second parameter it can also be ignored by someone who just wants the first.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
How can i give my date parameter a default value: {WOHeader.StartDate} = {?Date Range}
I would still like for the user if need be select a range of dates or just select all dates. If the date parameter is select then it would return the select dates. If the users doesn't touch the date parameter then it should return all dates.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top