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

Days of week

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
Was wondering if someone could give me some guidance. I am looking to automatically schedule a report and when it is run i would like the report to show data by day of week.....

So if the report runs on Tuesday it will show Mondays data:

11/08/2010 Data Data Data

When the report runs on Wednesday it will show both Monday and Tuesday

11/08/2010 Data Data Data
11/09/2010 Data Data Data

and so on so that when the report is run on the following Monday it will show Monday - Sunday....can someone help me accomplish this?

Thanks for any help or suggestions.

Paul
 
if dayofweek(currentdate,crMonday) <> 1 then
{table.date} in currentdate-dayofweek(currentdate,crMonday)+1 to currentdate-1 else
{table.date} in currentdate-7 to currentdate-1

-LB
 
Thanks lbass, i have tried a couple of different ways of using this formula but im not getting the desired results. So i tried using the formula in a formula field and then grouping on that formula field and i get a "True" next to the data.

Should i be using it differently?

Thanks again

Paul
 
This formula is intended as a record selection formula. Go to report->selection formula->record and enter it there.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top