Showing results for 
Search instead for 
Did you mean: 

ERROR while adding summary field in group footer

Former Member
0 Kudos

Hi all,

i am using CR Server XI R2

i am trying to a subtotal in a group header using the code below

fieldobjCls = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObjectClass();

fieldobjCls.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindField;

fieldobjCls.FieldValueType = CrFieldValueTypeEnum.crFieldValueTypeInt32sField;

fieldobjCls.Name = "Count";

fieldobjCls.DataSource = "Count({CSP_PROCESS_REPORT.userid})";

fieldobjCls.Left = 1000;

fieldobjCls.Top = 700;

fieldobjCls.Width = 1000;

fieldobjCls.Height = 300;

boSection = rcDoc.ReportDefinition.get_GroupHeaderArea(0).Sections[0];

rcDoc.ReportDefController.ReportObjectController.Add(fieldobjCls, boSection, -1);

as a result i am getting the error as

Cannot find the section in the group area pair of the summary field.

how to solve

Padmanaban V

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Try adding the summary field in the Report Designer first, then do the same steps in code. If it doesn't work in the deisgner it won't work in code.

Answers (0)