Bill

 

I set zero off and the report worked with the variables as I sent to
you.  I am not familiar with how the ZERO function affects reports
though I remember vaguely the warnings in the help information.  Thanks
for the help. 

 

Jim

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Bill
Downall
Sent: Monday, January 07, 2008 10:48 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: COUNT

 

Jim,

There is nothing testing the actual column "shipdate" to see whether it
is null or not. 

Try this expression, instead:

(ifeq(.COUNT_OF_SHIPDATE,NULL,0,.COUNT_OF_SHIPDATE) +
(IFNULL(ShipDate,0,1)) )

You may have to SET ZERO OFF for the report. 
Also, if your data ever has all shipdates blank for a report, you will
get division by zero and an error, so you may have to test for that,
too, maybe something like this: 

SHIPAVG = (.VSHIPTOT / (IFEQ(.COUNT_OF_SHIPDATE,0,1,.Count_Of_SHIPDATE))
)

Bill

On 1/7/08, Jim Belisle <[EMAIL PROTECTED]> wrote:

My null setting is '-0-' and my zero setting is set to 'on'.  The
expression I use was automatically set by RBASE when I used the
aggregate function in RBASE 6.5.  The expressions used in the report are
below:

COUNT_OF_SHIPDATE = (ifeq(.COUNT_OF_SHIPDATE,NULL,0,.COUNT_OF_SHIPDATE)
+ 1)

        VSHIPTOT = SUM OF SHIPDAYS

        SHIPAVG = (.VSHIPTOT / .COUNT_OF_SHIPDATE)

         

        
________________________________


        From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
Bill Downall
        Sent: Monday, January 07, 2008 9:23 AM
        To: RBASE-L Mailing List
        Subject: [RBASE-L] - Re: COUNT

         

        Jim,
        
        What R:BASE version are you using? Can you copy the relevant
expressions from your variables list, and paste them in a message? Also,
what is your NULL setting, and what is your ZERO setting? 
        
        Thanks.
        
        Bill

        On 1/7/08, Jim Belisle < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

        
        I have a report that should give me the average # of days to
ship orders
        for each of our customers.  I use the aggregate function for
        COUNT_OF_SHIPDATE in the detail section that resets in the
footer.  When
        I use the count feature in the table, it gives me the proper
number of 
        ship days and therefore the proper averages.  In the report
however, it
        gives me the total # of orders regardless of the ship date being
null.
        Do you have any suggestions?
        
        Jim

         

 

Reply via email to