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

Group on Today

Status
Not open for further replies.

djeddie

IS-IT--Management
Jun 1, 2003
38
AU
I have created a report which counts call stats. In the report, I have created two groups, month and week. The next group i wish to add is "today". How can i create a group that updates with only todays stats? to that tomorrow when i look at the report, it only shows that dates stats only ??

I tried creating a formula to select currentdatetime and grouped the formula but i havent been geting any luck.

Any help you be greatly apreciated!!!!
 
Write a record selection formula:

{YourDateField}=CurrentDate

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Create a formula

If {MyTable.Field} = CurrentDate Then 'Today' Else 'Other'

You can then insert a group on this formula, change teh group sorting to specified order, go to the Specified order tab and select Today, then on teh Others tab select Discard all others.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
If you're looking tomorrow, then you need CurrentDate-1. Make groups, maybe
Code:
if {your.date} >= CurrentDate-1 then "a) Today"
else
if {your.date} >= CurrentDate-7 then "b) This Week"
else
if Month({your.date}) = Month({CurrentDate}-1) and
   Year({your.date})  = Year({CurrentDate}-1) 
then "c) This Month"
else "d) Previous"
That's assuming you want them all, and with the oldest first - string groups sort alphabetically. If you don't want the older data, get rid of it in the selection statement, to save work for the server (which does it quicker).



[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
[yinyang] Windows XP & Crystal 10 [yinyang]
 
Madawc

I thought of this approach at first but it wouldn't give the correct results as Todays data would be omitted from the This week and This Month groups, and This weeks data would be omitted from This Months Group i.e.

Today = 29/09/2005
This Week = 26/09/2005 - 28/09/2005
This Month = 01/09/2005 - 25/09/2005



Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top