Weird output with associated field

Boaz Bezborodko boaz at mirrotek.com
Tue Jan 29 07:48:28 PST 2008


Jeff Harrison wrote:
> --- Boaz Bezborodko <boaz at mirrotek.com> wrote:
>
>   
>> I'm having trouble with a report.  I'm re-running an
>> accounting report 
>> that someone ran a week and a half ago, but I'm
>> getting a strange 
>> result.  One of the items in an associated field is
>> not being printed.
>>
>> Each record can store a few GL numbers in associated
>> fields A1.  The 
>> report selects the records by invoice date and sorts
>> them by A1.  The 
>> report that was run over a week ago seems to have
>> everything correct, 
>> but the report I'm running today has the associated
>> field missing on 
>> just one record.  Other records with associated
>> fields print out properly.
>>
>> I have the exact same problem with 3 other records
>> that are exactly the 
>> same in different months.  (They are monthly
>> insurance payments 
>> allocated to two different GL #s.)  For some reason
>> the second 
>> associated field on them also don't appear on the
>> reports for their 
>> respective months. 
>>
>> The records haven't been touched in between the runs
>> and the only change 
>> was indexing the selection to speed it up.  But the
>> records are 
>> definitely getting selected since the first
>> associated field appears on 
>> the file.  And the report is definitely printing
>> associated fields since 
>> other records with entries in the multiple
>> associated fields are 
>> displaying correctly.
>>
>> What is causing this and how do I fix it?
>>
>> Boaz
>> _______________________________________________
>>     
>
> Hi Boaz.  It is hard to answer this question without
> knowing the specifics of exactly what you are doing
> for sort/selection.  What does the -v table look like,
> what do the sort fields look like on the report?  What
> auto indexes do you have?  What does the selection
> table look like?
>
> A telling statement of yours was:
> ...
>   
>> and the only change 
>> was indexing the selection to speed it up. 
>>     
>
> Can you give more specifics here?
>
> Jeff Harrison
> jeffaharrison at yahoo.com
>
>   
OK, I found out that the problem occurs when I use indexing to go 
through the sort/selection processing to speed up the operation, but I 
still don't know why.

I execute rreport with a -io ('o' index is on the invoice date field 
'20').  I then ask for the beginning date (dummy field 'ba') and ending 
field ('bb').  I then use this to jump to the first record:

 32  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ? 
If:                                                                   ?
       Then: lookup -  k=ba   i=O 
-bg                                          ?

The selection processing then looks like this:

33  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ? 
If:                                                                   ?
      Then: 
ai(10,mdyy/,g)="12/31/2050"                                       ?
34  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ? If: 
'---------------------------------------------------------        ?
      
Then:                                                                   ?
35  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
SELECT ? If: 20 gt 
bb                                                          ?
      Then: lookup -  k=ai   i=O 
-bg                                          ?
36  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ? If: ag ne "" and ag ne 
17                                             ?
      Then: 
END                                                               ?
 37  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ? If: MID(30,"1","13") eq "Keyoffs check"   'Keyoff checks should 
not be>
       Then: 
END                                                               ?
 38  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ? If: 20 ge ba and 20 le bb and aa="" and 19 ne 
"AD"                    ?
       Then: 
SELECT                                                            ?

This selects every record with '20' within 'ba' and 'b'.  Even the 
record I'm missing gets selected for the first associated field in the 
record.  But the second associated field never shows up even though 
other records with something in the second associated field get printed.

The Sort for the output file looks like this.

???????????????????????????????? Field list ???????????????????????????????
?  1- VENDOR NAME (RANDOM 11- CHECK NUMBER (ALPHA 21- due date            ?
?  2-        address 1 (r 12- VOUCHER NUMBER      22- address line 3      ?
?  3-        address 2 (r 13- discount base       23- VENDOR NAME (RECENT ?
?  4-        city         14- terms    (days)     24- date units received ?
?  5-        state        15- discount (days)     25- sales tax code      ?
?  6-        zip          16- discount percent (% 26- taxable amount      ?
?  7- code for memo       17- VENDOR NUMBER       27- remarks             ?
?  8- CHECK NUMBER (NUMER 18- invoice amount      28- date posted         ?
?  9- date paid           19- invoice or debit me 29- customer ship-to (f ?
? 10- CHECK AMOUNT        20- invoice date        30- INVOICE NUMBER      ?
???????????????????????????????????????????????????????????????????????????
                    =A2
   ??????????????????????????? Sort definition ?????????????????????????
   ?                                                                   ?
   ?     Sort Field:  61 ?  A1)?  1  ?  28 ?  9  ?     ?     ?     ?   ?
---?         Length:    0?    5?   30?    8?    8?     ?     ?     ?   ?
   ?     Descending:     ?     ?     ?     ?     ?     ?     ?     ?   ?
   ? Subtotal Field:    f?    x?    x?     ?     ?     ?     ?     ?   ?
   ?                                                                   ?
le:???????????????????????????Press  ESC  To Record,  Ctrl-C  To Cancel?ETD

                            Press  F10  for help

And the output looks like this:

  !@td
  !@tm                      P U R C H A S E    J O U R N A L
                              *ba       - *bb

   V  E  N  D  O  R            INVOICE NUMBER       DATE REC'D  DATE 
POSTED  DATE PAID      AMOUNT  R E M A R K S
 ===============================================================================
                              D A T A   L I N E S
  *1                          *30                    *24         
*28      *ae*9        *A2           *ad
_____________________________T O T A L   L I N E 
S______________________________
               SUBTOTAL BY VENDOR NAME (RANDOM)           INDEX E

                          SUBTOTAL BY A1) GL NUMBER 1

 *A1        *ab

As far as I can tell everything looks kosher.  What am I missing?

Boaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20080129/05994437/attachment-0001.html 


More information about the Filepro-list mailing list