I have made a code for it just put it in the CODE Window... For going into the ODE Windows Firstly go to REPORT then go to REPORT PROPERTIES & then go to CODE Window....!
Code:
ADD this code there :
Public Function FormatIndian(ByVal Amount As decimal) As String
Dim strAmount As String
Dim strGrpsArr() As String
Dim lngPos As Long
Dim lngIndex As Long
strAmount = Format$(Amount, "#")
If Len(strAmount) < 4 Then
FormatIndian = strAmount
Else
lngIndex = (Len(strAmount) - 2) \ 2
ReDim strGrpsArr(lngIndex)
strGrpsArr(lngIndex) = Mid$(strAmount, Len(strAmount) - 2)
lngPos = Len(strAmount) - 4: lngIndex = lngIndex - 1
Do
strGrpsArr(lngIndex) = Mid$(strAmount, lngPos, 2)
lngPos = lngPos - 2: lngIndex = lngIndex - 1
If lngPos = 0 Then strGrpsArr(0) = Left$(strAmount, 1)
Loop Until lngPos <= 0
FormatIndian = Join(strGrpsArr, ",")
Erase strGrpsArr
End If
End Function
After that you need to add the following expression in the text box :
Code:
=code.FormatIndian(Fields!AMOUNT.Value)
Bookmarks