Michael,
By carefully selecting a reference date, and testing the result, a
simple method is available to get week numbers where the week starts on
a desired day. Someone here may have saved my method posted here some
time ago.
You can project a temp table from a view which includes a calculated
week number.
Let's say the column of interest is EntryDate.
WeekNum = ((EntryDate - '1/1/1980' - 1) / 7)
By adusting the RDATE value, you can get your weeks to come out exactly
as you wish, starting on the correct day of the week. Usually you
don't care what the exact numbers are because you use Weeknum as a
breakpoint on your report. You still break and sort on EntryDate but
do not display that breakpoint.
You can also create a WeekStart column, again by careful slection of a
reference date.
WeekStart = (ADDDAY('1/1/1980',(WeekNum * 7))
These examples will need testing to get them exactly as you want but
they are simple to use.
--Dennis McGrath
--- Michael Moser <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Some time back I think I saw a simple method for generating report
> totals by week in a R:Base report but I can not seem to remember how
> it was done or locate it - possibly a simptom of working too late
> into the evening ...
>
> Does anyone have a favorite solution to this problem. Basically I
> have dated records that include numeric columns. There are not
> records for every date. I need to print a report that generates a
> break footer with subtotals at weekly intervals ending with each
> Sunday, but there are no records for Sundays. All of the solutions I
> have come up with (using modular arithmetic MOD 7 or 7 day increments
> using ADDDAY) seem a bit convoluted - or at least my approach seems
> to be.
>
> I almost hate to ask because I am sure there is a really slick way to
> do this, and I'm going to kick myself when I see it :-{
>
> Thanks,
> Michael Moser
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/