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!

Need Help

Status
Not open for further replies.

sonadi

Programmer
Feb 5, 2010
8
US
I’m working on a new report and I need to add a date check to the parm date being passed. If they enter in a date less than 12-7-12 I need to default it to the 12-7-12 on both the begin and end date.
 
I do not have crystal in front of me so cannot test and apologize for any errors or misunderstandings.

What i get from your post is that you have a parameter that returns a user entered date value.
If that value is before December 7 2012, you want the date to default to December 7, 2012.

create two formulas, one for the start date and one for the end date and use them in your select expert:

//{@OnDateStart}
IF {%DateStart} < Dateserial(2012,12,07) then Dateserial(2012,12,07) else {%DateStart}

//{@OnDateEnd}
IF {%DateEnd} < Dateserial(2012,12,07) then Dateserial(2012,12,07) else {%DateEnd}
 
I think you need ?'s instead of %'s. Question marks are for parameters, I do not remember what percents are for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top