[quote user="Robert Hook"]By formatting are you referring to column values sort options?[/quote]
No, I mean formatting. When annotating an element with Item Types, for example, we can create formatted text that follows the rules defined in the Mstn Property Formatter schema.
When creating a Report, those same options are not available, at least programmatically. When creating the TextBlocks to make that label, I use this, which is building a class instance of a formatter using the Mstn Property Formatter schema (thanks to Paul Connelly for his help in achieving this)...
WCharCP AreaClassName { L"AreaClass" }; ECN::ECClassCP formatClass { formatSchema->GetClassCP (AreaClassName) }; StandaloneECEnablerP enabler { formatClass->GetDefaultStandaloneEnabler () }; StandaloneECInstancePtr localInstance { enabler->CreateInstance () }; if (localInstance.IsValid ()) { WCharCP PropUnits { L"Units" }; ECValue units { nUnits }; localInstance->SetValue (PropUnits, units); WCharCP PropAccuracy { L"Accuracy" }; ECValue valAccuracy { accuracy }; localInstance->SetValue (PropAccuracy, valAccuracy); WCharCP PropUnitDecorator { L"UnitDecorator" }; ECValue valDecorator { decorator }; localInstance->SetValue (PropUnitDecorator, valDecorator); } // use localInstance to create TextBlock
I don't see anywhere in the API how to apply similar formatting to a Report column. What I'm expecting or hoping is that there's a facility to assign a similar format to a column, and values assigned to that Report column will use that formatter when creating a table. Perhaps I'm assuming too much?