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!

Parameter defaul to yesterday

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
987
GB
Hi

We have a report that asks for 2 dates.

I am wondering if it is possible to run the report for Yesterdays date by default.

Any ideas how I can make the dates (or a date) default to yesterdays date.

Thanks
 
If report should run by default for yesterday's date, then you do not need to use a parameter. In the record selection formula, just use
[tt]{table.field}=currentdate-1[/tt].
 
Hi

Thanks for the reply. Also realised on a monday it needs to look at Friday, so trying to get it working with this

If Dayofweek = 1 then {datetimecreated} = CurrentDate-3
else {datetimecreated} = CurrentDate-1

Also just realised the report is using more complex dates than I thought so will have to rethink it all.

But I am sure your code and mine should work once I have the dates working how I would like

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top