on 10-14-2008 7:58 AM
Hello
In a dynamically generated Report in c#, i made a sum in some group footer i have generated.
the values to sum are integers. But Crystal show a result like that : 1254.00 and i want it this 1254.
here the code use to make the sum in the group footer
...
l_CrySectionSousTotal = m_ReportClientDocument.ReportDefController.ReportDefinition.get_GroupFooterArea(b_intNumGroupe).Sections[0];
l_champsTotal.FieldFormat.NumericFormat.RoundingFormat = CrRoundingTypeEnum.crRoundingTypeRoundToUnit;
l_champsTotal.FieldFormat.NumericFormat.NDecimalPlaces = 0;
l_champsTotal.DataSource = "Sum ({ado.Poids})";
m_ReportClientDocument.ReportDefController.ReportObjectController.Add(l_champsTotal, l_CrySectionSousTotal, -1);
it's seem's like the NDecimalPlaces property do nothing.... i don't understand.
if you have an exemple of use of NDecimalPlaces ....
thanks for you help.
Hello, Jonik;
The formatting changes will not take effect unless you tell the field not to use the default values.
So, try adding a line of code such as:
l_champsTotal.FieldFormat.CommonFormat.EnableSystemDefault = False;
before:
l_champsTotal.FieldFormat.NumericFormat.RoundingFormat = CrRoundingTypeEnum.crRoundingTypeRoundToUnit;
l_champsTotal.FieldFormat.NumericFormat.NDecimalPlaces = 0;
Elaine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks,
now it's ok.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.