|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Rounding $0.01 out
I have a repeat region with
Product name Product cost Markup Price (markup * Product Cost) Quantity Extension ((markup * Product Cost)* QTY) My extension is often 1 cent out I am expressing it in classic asp: =(FormatCurrency((Cdbl(Fufillment.Fields.Item("ProductCost").Value)*(Cdbl(Fufillment.Fields.Item("Markup").Value))*(Cdbl(Fufillment.Fields.Item("OrderQTY").Value))))) How do I restrict it |
|
#2
|
||||
|
||||
|
Can you give us an example of the data you are using so we can see what is going on. My only suggestion without seeing your data is to try using CDec instead of CDbl because CDbl is effectively rounding up/down to the nearest integer value, treating the number as a decimal may help.
|
|
#3
|
|||
|
|||
|
Product cost = 13.68
Markup =1.3 Price (markup * Product Cost) = 17.78 Quantity= 2 Extension ((markup * Product Cost)* QTY)=25.57 |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Rounding $0.01 out |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|