Message
From
15/09/2016 07:17:18
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01640823
Message ID:
01640866
Views:
56
>hi Martina,
>
>It appears that the problem is with the records that have UNIT_PRICE of 0.00 (zero). These records appear at the top of the report. Then, after all zero-unit-price items are printed, the items of higher UNIT_PRICE start to appear. I will try your suggestion to see if this will fix it.

To push zeros to the bottom, perhaps something like this:
FIELD1 + STR(100000000 - evl(UNIT_PRICE*100, 100000000),10) + FIELD2
>>Hi Dimitri,
>>
>>Not work for?!?
>>
>>The problem can cause decimal part...
>>
>>FIELD1 + STR(100000000 - UNIT_PRICE*100,10) + FIELD2
>>
>>
>>
>>MartinaJ
>>
>>>Hi,
>>>
>>>I need to sort report on 3 fields:
>>>
>>>FIELD1 + UNIT_PRICE + FIELD2
>>>
>>>FIELD1 and FIELD2 are CHAR types. UNIT_PRICE is DECIMAL
>>>
>>>The key is that the sort on UNIT_PRICE would be descending. That is, the higher number appearing at the top. I tried the following:
>>>
>>>
>>>FIELD1 + STR(1000000 - UNIT_PRICE,10,2) + FIELD2
>>>
>>>
>>>But it does not seem to work. Or does not work all the time. What am I doing wrong?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View