Tom,

        With appreciation to Larry Lustig and his presentation at the
4th Annual R:Base Developer's Conference entitled:  Points of Views
-- How the use of views can save you programming time, reduce errors,
and clarify your applications.

        It could have been entitled:  Expanding your view(s).
It certainly expanded my vision.

        From the Developer's Course Manual:
" Create Real Time Aggregated Data (1)

-- Don't wait until report time to 'create' information, use a view:

[modified example]
CREATE VIEW vwAging +
(Days0_30, +
Days31_61,  +
Days62_92,  +
Days93_123, +
Days124_153, +
Days154_183, +
Days184_275, +
Days276_365, +
Days366_732, +
DaysOver732, +
TotalDays), +
AS SELECT +
SUM(GI_0_30_Days), +
SUM(GI_31_61_Days), +
SUM(GI_62_92_Days), +
SUM(GI_93_123_Days), +
SUM(GI_124_153_Days), +
SUM(GI_154_183_Days), +
SUM(GI_184_275_Days), +
SUM(GI_276_365_Days), +
SUM(GI_366_732_Days), +
SUM(GI_Over732_Days) +
SUM(GI_0_Over732Days) +
    FROM Promotions +
   &vWhere
    [GROUP BY ...]

Quoting again:  "Create Real Time Aggregated Data (2)
Now you have this "table"
Advantages:  A (reasonably) sophisticated analysis with no code
or report expressions.  This table can be printed, selected to HTML,
exported, attached, etc. with no further code or expressions."

"The data is ALWAYS correct.  No worries about whether the
calculation routine was run."

         Just one of the many valuable tips gleaned from this years
conference.

All the best.

        Randy Peterson
        (tempted to fly to your neck of the woods for v.7 training
-- isn't Quantas the local airline?)

PS.  Don't worry Razzak, I'm planning to attend in Kansas City --
which I am hoping will be scheduled and announced :-)

Tom Grimshaw wrote:

> Anyway the problem appears to be solved as upgrading my code
> as per your suggestion to what follows has yet to glitch.
>
> $COMMAND
> CalSumGI
> -- Sums Deposits received for where clause
> -- Called by:
> --   RptsMenu in PromCmpn.apx
> *( Requires var
> vWhere
>     Returns var
> vSumPromoGI
> )
> -- Created by Tom Grimshaw 25-04-2002
> -- Modification history
> -- 15-05-2002  tlg  Combined SELECTS to one

================================================
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/

Reply via email to