Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Report Requirement:

Recently client came with the Report requirement of adding a "." between each digit of a Number value in Database Field. For example, if Database Field Value is: 12345 then client want to show in the report as:

Interestingly the length of the number can change, sometimes it will be 2 digits and sometimes it will be 6 digits etc.


Crystal Report is so much powerful that it can be done by simply creating a Variable with below logic:

Note: In the below logic DATA_PROC.SRL_NBR is a field of a Procedure. You can do the same thing for Field of a Table.

stringVar x := "";
numberVar y := Length(ToText(Trim({DATA_PROC.SRL_NBR})));
numberVar start_pos := 1;
x := Mid (ToText(Trim({DATA_PROC.SRL_NBR})), start_pos,1 );

if (y > 1) then


start_pos := start_pos + 1;

x := x + "." + Mid (ToText(Trim({DATA_PROC.SRL_NBR})), start_pos,1 );

) while (start_pos < (y-1));


Labels in this area