[Download-List] [U2] Cedarville Download (totals using BY.EXP)

David L. Rotman rotmand at cedarville.edu
Fri Jul 9 08:15:40 EDT 2010


Vance--
 
The behavior you are seeing reflects the same behavior you would get with the Unidata LIST statement.  I assume Universe would produce similar results.
 
Using BY.EXP causes LIST and DOWNLOAD to produce an output record for each of the multivalues in your field INVOICE.  So, running a total on CASH is going to give an inflated value.
 
Here is an approach that may accomplish what you want:
SSELECT CASH-REC BY WHSE BY DATE
DOWNLOAD CASH-REC _
    @ID _
    INVOICE _
    NUM.VALUES ALL MV.ORIENTATION VERTICAL _
    CASH _
  FOOTING.ON FINAL   LITERAL 'Grand' LITERAL 'Total' TOTAL CASH _
  HEADING            LITERAL 'Record' LITERAL 'Invoice' LITERAL 'Cash'

This should produce output like this (assuming several invoices per record):
"Record","Invoice","Cash"
"308","123456",27.00
,"789012"
,"408765"
"417","333322",55.00
,"333444"
,"412738"
,"510632"
,"230288"
"Grand","Total",82.00

Please let me know if I have misunderstood what you were trying to do.




Dave Rotman
Associate Vice President for Technology
Chief Information Officer
Cedarville University
251 N. Main Street
Cedarville, OH 45314
rotmand at cedarville.edu
voice 937-766-7905
fax 937-766-8819
 


>>> On 7/8/2010 at 2:40 PM, in message <5350139F0E6341429BC52473D4833700B88AE3E4A1 at MAIL1.jdl.com>, "Alspach, Vance" <VAlspach at johndeerelandscapes.com> wrote:

AIX 5.3
Universe 10.2.4 Pick

We have been using Cedarville DOWNLOAD for simple extracts rather developing custom programs for each extract.  We are now converting some more complex reports to extracts and having a bit of difficulty.

Has anybody ever tried TOTALing a single valued field while using BY.EXP on another field with Cedarville Download?  It seems to accumulate the total for each multivalue.  This is only an example of what I am experiencing, not the actual DOWNLOAD command.

SSELECT CASH-REC BY WHSE BY DATE BY-EXP INVOICE
DOWNLOAD CASH-REC BY.EXP INVOICE TOTAL CASH INVOICE



CASH                     INVOICE
27.00                     123456
                                789654
55.00                     333322
                                333444
--------
164.00


Acting like,

CASH                     INVOICE
27.00                     123456
27.00                     789654
55.00                     333322
55.00                     333444
--------
164.00


TIA,

Vance Alspach
John Deere Landscapes



________________________________
CONFIDENTIALITY. This electronic mail and any files transmitted with it may contain information proprietary to Deere & Company, or one of its subsidiaries or affiliates, and are intended solely for the use of the individual or entity to whom they are addressed, shall be maintained in confidence and not disclosed to third parties without the written consent of the sender. If you are not the intended recipient or the person responsible for delivering the electronic mail to the intended recipient, be advised that you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return mail.
_______________________________________________
U2-Users mailing list
U2-Users at listserver.u2ug.org 
http://listserver.u2ug.org/mailman/listinfo/u2-users





More information about the download-list mailing list