Showing posts with label Crystal Report. Show all posts
Showing posts with label Crystal Report. Show all posts

Friday, January 3, 2014

Crystal Report : Group wise total at the Group Header

To show the Group wise total at the group header in Crystal Reports,

Follow the following steps.,
1. Create a Crystal report formula.
2. Use the following expression
sum ({tablename.field_to_summarize}, {tablename.field_you_wanna_grouping_on})
3. Place the created formula in the required group header.

Wednesday, February 22, 2012

Indian rupee format in crystal reports

Method-1:
Step-1 : Create new formula and go-on with editor
Step-2 : Copy the following formula and paste it in the coding part  
                      Cstr({FieldName},"##,##,##,##0.00") or CStr({FieldName}, "##,##,##,###.##") 
 
ie., {FieldName}-- The Amount Field Name

Method-2 :
Step-1 : Create new formula and go-on with editor
Step-2 : Copy the following formula and paste it in the coding part  


                      StringVar Amt;
                      StringVar s;
                      NumberVar N;
                      Amt:=Replace(Totext({FieldName}),",","");
                      s:=left(Amt,len(Amt)-3);
                      N:=len(s);
                      Select N
                      case 4:
                      left(s,1)&","& right(s,3) & ".00"
                      case 5:
                      left(s,2)&","& right(s,3)& ".00"
                      case 6:
                      left(s,1)&","& mid(s,2,2) & "," & right(s,3)& ".00"
                      case 7:
                      left(s,2)&","& mid(s,3,2) & "," & right(s,3)& ".00"
                      case 8:
                      left(s,1)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
                      case 9:
                      left(s,2)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
                     default:
                      s; 

ie., {FieldName}-- The Amount Field Name