Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANFORM giving ***.** as a result
Message
From
19/05/2006 09:28:50
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
19/05/2006 08:52:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01123511
Message ID:
01123554
Views:
18
Nope, but a good guess. It has to do with the TRANSFORM converting it. If I use "@Z" it will display, though now it seems to be rounding some of my 3-decimal place values to 2. What a PITA this is. It works great, except it wants to transform my numeric values into something they are not. If the numeric value is 1234.567, then the result should be "1234.567" not "1234.57" like it's doing now.

>Divide by zero?
>
>>Update Again: I think I fixed it using "@Z" in the TRANSFORM function. Not sure why it didn't screw-up non-numeric fields, but it seems to work. Any enlightenment from anyone on the logic of this would be greatly appreaciated.
>>
>>>Update: If I add "999.99" to the TRANSFORM function, it displays correctly. Unfortunately, the whole idea of using this funtion was because the fields could be any type, not just numeric. I cannot simply add this paramter as it would screw up non-numeric type field values.
>>>
>>>
>>>>Got a little routine that creates Excel and comma-delimited variables from the records in a cursor. I'm seeing one of the columns coming out in the results as "***.**" instead of "120.32" though other fields seem fine, regardless of their size. Is it something to do with the TRANSFORM function and the size of the first record's value (which is only "12.34")? Or something?
>>>>
>>>>
>>>>
>>>>PROCEDURE p_CreateDownloadFiles
>>>>
>>>>SCAN
>>>>   FOR I = 1 TO FCOUNT()
>>>>      m.CommaDelimitedData = m.CommaDelimitedData + '"' + TRANSFORM(EVALUATE(FIELD(I))) + '"' + IIF(I <FCOUNT(), ',', '' )
>>>>      m.ExcelData = m.ExcelData + TRANSFORM(EVALUATE(FIELD(I))) + CHR(9)
>>>>   NEXT
>>>>   m.CommaDelimitedData = m.CommaDelimitedData + TCR_LF
>>>>   m.ExcelData = m.ExcelData + TCR_LF
>>>>ENDSCAN
>>>>
>>>>ENDPROC
>>>>
>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform