Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data loss using REPORT TO FILE ASCII
Message
From
15/01/2003 07:24:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
14/01/2003 13:24:19
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00741527
Message ID:
00741828
Views:
29
>>>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,
>>Why should they be the same ? Report definition has an impact on it. Sounds like you have a report where detail band has 3 lines (f1,f2,f3 per line) so you wait at least 3*recco() ?
>
>Yes. I have a report (www.eetasoft.ee/reporttoascii.zip) containing three fields in detail band:
>
>f1
>
>f2
>
>f3
>
>There are no other objects in this reports.

I see now. Sorry have no idea. I never trust report when it's ASCII and roll my own text merging.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform