#error in a report (1 Viewer)

kkulick

Registered User.
Local time
Today, 07:23
Joined
Jul 11, 2000
Messages
19
I'm trying to group different section of a report header by the week ending date. I have tried putting =DateAdd("d",6-Weekday(Now()),Now()) in. It works, but it gives me the same week ending in every group, nothing unique to every group. If I drag my date field in the header it gives me the last date of the week that is grouped. So I then tried using this, =DateAdd("d",(Weekday([Date])-2)*-1,Now()), but I get an #error that shows on the report. Does anyone have any other ideas how I can get a week ending to group different weeks on a page. Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:23
Joined
Feb 19, 2002
Messages
43,700
In the report's sorting and grouping properties, you can specify week as an option when you are grouping by a date field.
 

kkulick

Registered User.
Local time
Today, 07:23
Joined
Jul 11, 2000
Messages
19
Pat, I've tried that also. I can get it to group by the week, but when I put the equation in that I mentioned earlier, it does not update for each group like the date does. Have an idea? Thanks.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:23
Joined
Feb 19, 2002
Messages
43,700
Do the calculation in an unbound field. Hide the week number field that you are using for sorting and grouping if you don't want to see it.

Use the Date() function rather than Now() in the calculation since you are not concerned with time.
 

kkulick

Registered User.
Local time
Today, 07:23
Joined
Jul 11, 2000
Messages
19
thanks again, but that still didn't work. I don't know what to do with this.
 

Users who are viewing this thread

Top Bottom