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

If Then in Select Expert?

Status
Not open for further replies.

jonmohr

IS-IT--Management
Sep 15, 2004
118
US
Can you use an if then in a select expert?

What I'm trying to do is run run a report automatically w/o having to select a date to run it for (no parameters). However, the problem is, I do not want to run the report for Saturdays or Sunday (non-biz days).

So, what I trying to find out is how I can use the following with my date field:

If Currendate = 2 then
{table.date} = Currentdate - 3
else {table.date} = Currentdate - 1

Thanks everyone in advance!
 
Yes, you can use functions in the record selection, and depending upon your software version (please remember to post this) you'd select Report->Edit Selection Formula-Record

If not(dayofweek(Currendate) in [7,1]) then
{table.date} <= currentdate
else
{table.date} <= maximum(lastfullweek)-1

Assumes Sunday as your starting day of the week.

Should be about right...

-k


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top