Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Localization Post Reply Post New Topic
Author Message
eranohayon
Newbie
Newbie


Joined: 18 Aug 2010
Online Status: Offline
Posts: 1
Quote eranohayon Replybullet Topic: Localization
    Posted: 18 Aug 2010 at 11:04pm
I need to display Sum of groups and Total in the format of the system locale (e.g. in english- 123,123 in russion- 123 123).
In addition, because the summarised values are integers, I don't want to display the decimal digits.
If I change the Number format property of the field to 0 decimal digits, the format automaticaly is changed to- Custom. In this case the decimal digits are not displayed but the format of the number is not localized.
If I change the Number format back to the System default, the number is displayed according to the system locale but again the decimal digits are displayed.
 
I tried to solve it by adding a formula instead of using the Group wizard:
CStr(Sum ({sample_header_List_view.total_tests}),0)
But this is o.k. for the Total, and not for the groups sub totals. I didn't find a way to sum by group in a formula.
 
Helppppppppp
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 19 Aug 2010 at 11:06am

Create a formula like this:

CStr(Sum ({sample_header_List_view.total_tests}, {group field}),0)
 
There are two forms of the Summary functions (Sum, Count, etc.):
 
Sum({field}) gives you the grand total for the report
Sum({field}, {group field}) gives you the total for a group that has been defined on the report.
 
-Dell
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.032 seconds.