Michael:
I use the following calculations to either create variables or columns in
views to accomplish what you are trying to do.
These calculate the Monday through Sunday or Sunday through Saturday dates
for week calculations.
Note:
wb = week beginning
we = week ending
SET VAR vwb_monday DATE = (.#DATE - (6 + (IDWK(.#DATE))))
--
SET VAR vwe_sunday DATE = (.#DATE - (IDWK(.#DATE)))
--
SET VAR vwb_sunday DATE = (.#DATE - (7 + IDWK(.#DATE)))
--
SET VAR vwe_saturday DATE = (.vwb_sunday + 6)
You can use the same techniques in a view definition by simply substituting
your column names for the .#DATE references above. Once these columns are
added to a view you can treat them like a regular column including
performing summaries by a week range.
Hope this helps.
Mike Ramsour
-----Original Message-----
From: David M. Blocker [mailto:davidmblocker@;attbi.com]
Sent: Thursday, October 24, 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: Totals by week
Michael
Give us a little more info.
1. Is this run for a "from start to finish" -ie, all data in the table
basis - or for a set period of time (12 weeks, with a starting date) or
user entered start - end dates?]
2. Is the desired output like this?
Week Of Total
10/28/02 $100
11/04/02 $300
11/11/02 $250
etc.
or this:
10/28/02 11/04/02 11/11/02 11/18/02
$100 $300 $250 $275
3. Is this another column involved in the grouping, say company, department,
etc.?
David Blocker
----- Original Message -----
From: "Michael Moser" <[EMAIL PROTECTED]>
To: "R:Base List Server" <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 12:27 AM
Subject: Totals by week
> 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/
================================================
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/