You may not know that the Search feature is working again, I answered this question in thread767-438413
Here is the text of the thread:
This should work and puts sunday in the previous week in the details.
//begin
datevar grpwk;
grpwk := if dayofweek({Table.datefield})= 1 then
(date({Table.datefield})-6) else
(date({table.datefield}-dayofweek({table.datefield}))+2);
grpwk
//end
Also, to display the correct Monday date in the group tree as well as on the report - customize the groupname (assuming you are using @grpwk) (you can right click/change group/customize group name/formula and enter:
ToText({@GrpWk})
This will display Monday's date as the group name and as such in the Group Tree - otherwise it is confusing to see two different dates.
By Default DayOfWeek( returns 1 if it's a Sunday, 2=Monday,etc.)
The other useful formula is
(table.datefield) - dayofWeek({table,datefield})
always takes you bak to the previous saturday.
So you need a Start of Week formula of
If dayofWeek({table,datefield}) =1 then //sunday
(table.datefield) - dayofWeek({table,datefield}) -5
else //Monday onwards
(table.datefield) - dayofWeek({table,datefield}) + 2 Editor and Publisher of Crystal Clear
I think that i didnt explain my problem correct
as the formulas you have given to me works
and that is great, but,
my mean consern is to use the weekdays in a report starting with monday and ending with sunday and again to keep thos
seven days together in the report, as a group.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.