Page 1 of 1

Memo field Incomplete

Posted: Tue Aug 04, 2015 12:40 pm
by omni
Roger,

Running into an issue at one location, very random. User books an order, then updates what is called product information, which is a memo field in a separate database. He then prints the order and the product detail prints. However, on random occasions on a new order only a line or two of the product detail will print instead of all lines (usually half or less of what is there). Any time the user goes back it prints properly. So far it appears to be very random, and only on new orders, which are sent to the driver for what product detail to pick up. On this occasion the driver missed pickup up half the product because it did not print.(Yes, they were not happy about that)
Never seen a memo field only print half the data. The only difference I see is that the data is new and just saved.

this is how its stored for the printout, which is used for all memo fields:

STORE MlCount(prod,50,4,.t.) TO MEMOP
SPC=1
DO WHILE SPC<=MEMOP .and. spc<100

STORE 'prod'+STRzero(SPC,2) TO Xprod

STORE MemoLine( prod,50,SPC,4,.t.) TO &Xprod
SPC=SPC+1
ENDDO


and prints with this code:

if memop>0
@ROWW,1 dcprint say REPLICATE(CHR(220),125) PRINTER oPrinter
ROWW=ROWW+1
@ROWW,1 dcprint say "PRODUCT DETAIL:" PRINTER oPrinter Font "9.Arial Bold"
SPC=1
DO WHILE SPC<=MEMOP .and. spc<100
IF ROWW>57
DO HEADER
@ROWW,1 dcprint say "PRODUCT DETAIL:(CONT)" PRINTER oPrinter Font "9.Arial Bold"
ENDIF

STORE 'PROD'+STRzero(SPC,2) TO XPROD
if !empty(&xprod)
@ROWW,23 dcprint say &XPROD PRINTER oPrinter
ROWW=ROWW+1
endif

SPC=SPC+1
ENDDO
endif

The file is open and closed due to prior problems with
select 80
use products order products

and is closed when completed.

Just to check to see if it helps. I have made a change to not close it and just leave it open, but check to be sure its open. Again, just guessing it is some sort of memory issue reopening a file on the last record saved from the server(?).


Update: User now tells me it is when they are in prchoice and the second time printing it leaves off the other half. Should be able to figure it out from that, i think. That new information helps.

Thanks
Fred
Omni

Re: Memo field Incomplete

Posted: Tue Aug 04, 2015 1:01 pm
by Auge_Ohr
omni wrote:However, on random occasions on a new order only ...
so Memo Data might be still in "Cache" ...

Question : did you use Alaska SMB2 Patch ?

Re: Memo field Incomplete

Posted: Tue Aug 04, 2015 1:09 pm
by rdonnay
This code doesn't look like it's storing data to a memo field.
It looks like you have a lot of field names that start with PROD.

Re: Memo field Incomplete

Posted: Fri Aug 14, 2015 2:57 pm
by omni
Not updating anything, just reading the memo field and splitting into lines to print on a form. what you are seeing is the var printing. Anyway,The line counter was getting reset later and the next time printing it stopped at that new line counter. A silly program error now fixed.

Fred