hi....i've developed on ssrs report which displays the number in words i.e in million and billion..i want it in crores ,lakhs,thousands,hundreds,rupees and paise.. can any one modifiy the code below..which is in reports properties->code tab..the below is my code which is of million and billion dollars and cents....SHARED suffixes AS String() ={"Thousand ", "Million ", "Billion ", "Trillion ","Quadrillion ", "Quintillion ", "Sextillion "}SHARED units AS String() ={"","One ", "Two ", "Three ", "Four ", "Five ","Six ", "Seven ", "Eight ", "Nine "}SHARED tens AS String() ={"Twenty ", "Thirty ", "Forty ", "Fifty ", "Sixty ","Seventy ", "Eighty ", "Ninety "}SHARED digits AS String() ={"Ten ","Eleven ", "Twelve ", "Thirteen ", "Fourteen ","Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen"}SHARED expr AS NEW System.Text.RegularExpressions.Regex("^-?\d+(\.\d{2})?$",System.Text.RegularExpressions.RegexOptions.None)Public Function ExpandPrice(Price AS Double, Optional pSeparator AS String = ",") AS String Dim pPrice As String pPrice = FORMAT(Price,"##############.00")Dim temp AS New System.Text.StringBuilder() If Not expr.IsMatch(pPrice) Then ' temp.Append(pPrice) or whatever you want to do here Else Dim parts AS String() = pPrice.Split(pSeparator) Dim dollars AS String = parts(0) Dim cents AS String = parts(1) If CDbl(dollars) > 1 Then temp.Append(ExpandIntegerNumber(dollars) & "Dollars ") If CInt(cents) > 0 Then temp.Append("And ") End IfElseIf CDbl(dollars) = 0 Then temp.Append(ExpandIntegerNumber(dollars) & "Zero Dollars ")If CInt(cents) >= 0 Then temp.Append("And ") End IfElseIf CDbl(dollars) = 1 Thentemp.Append(ExpandIntegerNumber(dollars) & "Dollar " )End IfIf CDbl(cents) > 1 Thentemp.Append(ExpandIntegerNumber(cents) & "Cents")ElseIf CDbl(cents) = 0 Thentemp.Append(ExpandIntegerNumber(cents) & "Zero Cents ")ElseIf CDbl(cents) = 1 Thentemp.Append(ExpandIntegerNumber(cents) & "Cent " )End IfEnd IfRETURN temp.ToString()End FunctionFunction ExpandIntegerNumber(pNumberStr AS String) AS StringDim temp2 AS New System.Text.StringBuilder()Dim number AS String =StrDup(3 - Len(pNumberStr) Mod 3, "0") & pNumberStrDim i AS Integer, j AS Integer = -1Dim numPart AS StringFor i = Len(number) - 2 To 1 Step -3numPart = Mid(number, i, 3)If Clng(numPart > 0) ThenIf j > -1 Thentemp2.Insert(0,suffixes(j),1)End IfEnd Iftemp2.Insert(0,GetNumberUnder1000Str(numPart),1)j += 1NextRETURN temp2.ToString()End FunctionFunction GetNumberUnder1000Str(pNumber AS String) AS StringDim temp1 AS New System.Text.StringBuilder()If Len(pNumber) = 3 ThenIf CLng(Left(pNumber, 1)) > 0 Thentemp1.Append(GetNumberUnder100Str(Left(pNumber, 1)) & "Hundred ")End IfEnd Iftemp1.Append(GetNumberUnder100Str(Right("0" & pNumber, 2)))RETURN temp1.ToString()End FunctionFunction GetNumberUnder100Str(pNumber AS String) AS StringIf pNumber > 19 ThenRETURN tens(Left(pNumber, 1) - 2) & units(Right(pNumber, 1))ElseIF pNumber >= 10 and pNumber <= 19 ThenRETURN digits(Right(pNumber, 1))ElseRETURN units(Right(pNumber, 1))End IfEnd Function
please modify the code..