Skip to Content
0
Former Member
Jan 06, 2008 at 11:31 AM

Group Headers Missing in Report

48 Views

Post Author: CHTClay

CA Forum: .NET

Ok, this is driving me full goose bozo. Using RAS SDK I can add grouping to my reports all day long, however, when I run the report the group header is blank. The groups show up in the group tree, just no text in the group field. Here is the code I use to group:

private void AddGroup(ISCDReportClientDocument oDoc, string TableName, string FieldName)

{

CrystalDecisions.ReportAppServer.DataDefModel.Group oGroup;

CrystalDecisions.ReportAppServer.DataDefModel.Table oTable;

ISCRTable oISCRTable;

Field oField;

oGroup = new CrystalDecisions.ReportAppServer.DataDefModel.GroupClass();

oISCRTable = oDoc.Database.Tables.FindTableByAlias(TableName);

oTable = ((CrystalDecisions.ReportAppServer.DataDefModel.Table)oISCRTable);

oField = ((Field)oTable.DataFields.FindField(FieldName, CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleUserDefault));

oGroup.ConditionField = oField;

oDoc.DataDefController.GroupController.Add(-1, oGroup);

}