The following code adds two columns to a Report. The first shows the Total Length property of Complex String elements, the second shows the Total Length property of Line String and Line elements...
AddColumn (*groupNode, L"BaseElementSchema", L"MstnComplex", L"Total Length", L"TotalLength"); AddColumn (*groupNode, L"BaseElementSchema", L"MstnLineSegments", L"Total Length", L"TotalLength");
Here's the AddColumn function, which is pretty much the same as the SDK Report example...
void AddColumn (ColumnGroupNodeR groupNode, WCharCP schemaName, WCharCP className, WCharCP columnName, WCharCP accessString) { ColumnDefinitionNodePtr columnNode = groupNode.CreateColumnDefinition (columnName, -1); ReportColumnAccessorList accessors; accessors.push_back (ReportColumnAccessor (QualifiedECAccessor (schemaName, className, accessString))); columnNode->SetAccessors (accessors); columnNode->Write (); }
Here's what the report shows for three complex strings, one line string and one line...
What I would prefer to see is a single Total Length column. I need somehow to merge the two column definitions. How do I achieve that goal?