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

Maximum Formula in Selection Criteria

Status
Not open for further replies.

Fergalk

Programmer
Jul 28, 2003
2
GB
Hello All,

I am trying to select records from a payroll database for the previous week only. I put into the selection expert as a formula, maximum({payroll.Period}) but it tells me that it can't evaluate until later. Is there a way around this or do I need to find a new method (if so any ideas.)

Thank you
Fergal
 
If you want last weeks records then :

{payroll.Period} in LastFullWeek

If you want the last 7 days then :

{payroll.Period} >= currentdate-7 and
{payroll.Period} < currentdate

Hope this helps.....

Reebo
Scotland (Sunny with a Smile)
 
Thanks for that Reebo,

the only problem is it is not a date format, it is a number format and is formated like 200330 which is last week. Thats why I was trying to use the maximum function. This will keep going for ever without any need to change for holidays or changes in the week.

The trouble with lastfullweek is that our payroll period weeks start on a Monday not on a Sunday. The last 7 days will need to be altered when we are not here on holidays (where most fall on Mondays) I am trying to publish to enterprise and forget about it hence the need to automate the selection.

Any other ideas would be appreciated.

Fergal
 
Ok, you can group by {payroll.Period} then put in the GROUP selection formula :

{payroll.Period} = maximum({payroll.Period}, {payroll.Period})

let me know how you get on......

Reebo
Scotland (Sunny with a Smile)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top