Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data loss using REPORT TO FILE ASCII
Message
De
18/01/2003 10:19:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00741527
Message ID:
00743138
Vues:
25
I tried this with VFP 7SP1 and VFP 8 beeta.
I prepared a reproducible sample about data loss which
you can download from www.eetasoft.ee/dataloss.zip

In this sample, it is interesting that
REPORT TO ascii merges lines if i use
REPORT FORM WIDE TO FILE wide ASCII  NEXT 5
However,
REPORT FORM WIDE TO FILE wide ASCII  NEXT 1
does not merge lines !

It seems that for each record, report commands makes some
error at vertical position calculation.
If I increase spacing between rows or decrease font size,
this works. However, if number of records processed in report commad increases, this bug starts to appear.

It seems that problem occurs ofter in W2K than in Windows 2000.

>Hi Andrus and Sergey,
>
>Some months ago, one of my clients reported data loss when they selected ASCII file output. The report was a single page of personal data that printed correctly, but created an ASCII file with some of the data missing.
>
>I thought it may be an aberation with the data itself, but it now seems it may be a VFP REPORT FORM TO ASCII bug. Andrus, what version of VFP are you using? I use v7 with SP1.
>
>Regards...Rex
>
>
>>You can try to increase the # of rows per page by removing extra space between lines in report so you don't exceed the max. # of pages in VFP report (65,534).
>>
>>>Report used in the followng code is available at
>>>www.eetasoft.ee/reporttoascii.zip
>>>This is very simple report containing only three fields
>>>having plenty of empty space.
>>>
>>>To reproduce, run the following program:
>>>
>>>CREATE TABLE test ( f1 c(1), F2 C(1), F3 C(1) )
>>>APPEND BLANK
>>>
>>>FOR i=1 TO 20
>>>  COPY TO t
>>>  APPEND FROM t
>>>  ENDFOR
>>>
>>>REPLACE ALL f1 WITH TRANSFORM(RECNO()%10), ;
>>>     f2 WITH TRANSFORM((RECNO()+1)%10), ;
>>>   f3 WITH TRANSFORM( (RECNO()+2)%10)
>>>
>>>REPORT FORM test TO FILE test ASCII
>>>CREATE TABLE test1 ( f1 c(10) )
>>>APPEND FROM test.txt SDF FOR !EMPTY(F1)
>>>
>>>MESSAGEBOX( 'Expected '+TRANSFORM(3*RECCOUNT('test')) + CHR(13)+ ;
>>>   'Actual ' +TRANSFORM(RECCOUNT('test1')) )
>>>
>>>
>>>Observed result:
>>>
>>>Expected: 3145728
>>>Actual: 2752428
>>>
>>>
>>>Expected result:
>>>
>>>numbers in message box must be same.
>>>
>>>
>>>Is it possible to fix this problem so that data loss does not occur ?
Andrus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform