Formats a number by applying characteristics such as scaling and delimiters.
<HFMwData>.GetFormattedNumber dNumber, lNumDecimals, bstrDecimalCharacter, bstrThousandsCharacter, sScale, bRemoveTrailingZeroes, pbstrFormattedNumberSpecifies the number of decimal places to be included in the formatted number. | |
Specifies the decimal separator character to be used in the formatted number. To apply the application’s default decimal separator, use the HFMwSession component’s decimalSeparator property. | |
Specifies the thousands separator character to be used in the formatted number. To apply the application’s default thousands separator, use the HFMwSession component’s thousandsSeparator property. | |
Specifies the degree of scaling to apply to the formatted number. Scaling works as described in the following list: | |
Determines whether trailing zeroes will be stripped from the decimal segment of the formatted number. Pass TRUE to strip trailing zeroes, FALSE otherwise. | |
The following function scales a number by a thousandth and applies the application’s default decimal and thousands separators to the formatted number.
Function ScaleToThousandths(dNum)
Dim cHFMData, sNum
Set cHFMData = Server.CreateObject("Hyperion.HFMwData")
' cHFMSession is a previously set HFMwSession object
cHFMData.SetWebSession cHFMSession
cHFMData.GetFormattedNumber dNum, 0, _
cHFMSession.decimalSeparator, _
cHFMSession.thousandsSeparator, 3, TRUE, sRetVal
ScaleToThousandths = sRetVal
End Function