|......you would expect that the aggregate count variables at the end of the
|report would have different
|sums for each column since the count function is supposed to include only
|not null values. That, however, is not the case.
================================================

Bill,

Since the R:BASE report engine steps through each row, one by one,
I suggest you use a variable for each of the column counts like this:
     vCOL2 = (IFNULL(COL2,.vCOL2,(.vCOL2+1)))
This expression increments the value of vCOL2 by 1 whenever
COL2 is not null; otherwise the value of vCOL2 is  not incremented.
Be sure to define vCOL2 INTEGER first.  Either initialize it to 0
prior to running the report or be sure to SET ZERO ON.  Also, be
sure to place the vars in the DETAIL section and clear the vars after
printing.

---------------------------------------------------------------------------
Eric M. Bienstock, Ph.D.
   Database Development, etc.
      Authorized R:BASE Developer
         Eric M. Bienstock & Associates, Inc.
            day: 212-978-7948    eve:  973-763-8650(8)
               FAX:  775-254-2109    [EMAIL PROTECTED]
                   http://mywebpages.comcast.net/ericmb/
---------------------------------------------------------------------------

----- Original Message -----
From: "Bill Eyring" <[EMAIL PROTECTED]>
To: "Rbase Mail List (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 10:37 AM
Subject: Multiple Count Aggregate Report Variables


| I have recently had the need to create a report with multiple aggregate
| report variables using the count function. I am working with Rbase for
| Windows 6.5++ build 1.851xRT03.
|
| The first column in the report all have not null values. The succeeding
| columns may or may not have values. Logically then you would expect that
the
| aggregate count variables at the end of the report would have different
sums
| for each column since the count function is supposed to include only not
| null values. That, however, is not the case. The sum of each variable is
the
| same as the largest aggregate variable sum.
|
| In my report I defined each aggregate variable by choosing
Variables,Create
| Aggregate Variables,Select column Name,Select function(Count) and then
add.
| Each aggregate variable is based on a different column. I then placed each
| aggregate variable in the report footer underneath each column. When you
| check Variable,Change Section each variable is calculated on the Detail
| section.
|
| The report has only 3 sections - ReportHeader,Detail and ReportFooter.
|
| There are no break headers or footers in the report. The SHOW CHAR command
| at the R> prompt shows;
| Quotes= '
| Plus= +
| Single= _
| Many= %
| IDQuotes=`
|
| The settings for ANSI,ZERO or Null does not change the result of the
| aggregate variables.
|
| Here is an example:
|
|             IdNum    Col2    Col3    Col4    Col5
|             X            X                X
|             X                    X        X       X
|             X            X                X
|             X                             X
|             X            X                        X
|
| Totals      5            5       5        5       5
|
| The correct totals should be;
|             5            3       1        4       2
|
| I have reported this to Rbase Technical Support and they were good enough
to
| suggest a workaround.
|
| Can anyone replicate this problem or suggest an answer to this problem ?
|
| Thanks,
|
| Bill Eyring
| Director of Information Systems
| Michael Haberman Associates, Inc.
| 125 Front Street, Mineola, N.Y. 11501
| 516-739-8080
| Rbase Developer
|
| ================================================
| 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/

Reply via email to