Posts

Showing posts from March, 2018

Comma Separator for Crore and Lac in GridView Column (Indian Format)

In order to show a number with comma separator (Indian Format) for Crore and Lac  in ASP.NET GridView you have to create a function in cs file..... public string ConvertToIndianFormat(string text)     {         if (text != "")         {             decimal num = decimal.Parse(text);             return num.ToString("N", new CultureInfo("hi-IN"));             }         else         {             return null;         }     } In aspx... <asp:TemplateField HeaderText="Amount" >             ...

Crystal Report Comma Separator for Crore and Lac (Indian Format)

In order to show a number with comma for 'Crore' and 'Lac' you need to follow this... # Right click on number field # Click on 'Format Object' # Select 'Common Tab' # Create the following formula in 'Display String' option if ( CurrentFieldValue < 0) then '('+     Replace (             ( Replace (                         ( ToText ( CurrentFieldValue , '##,##,##,##,##0.00')),                       ' ', '') //--Remove extra space from left (if number is small)              ), '-','')  //--Remove minus (-) sign from left + ')' else ToText ( CurrentFieldValue , '##,##,##,##,##0.00')