Suppose I have composed an ECQuery programmatically (see WhereCriterion::CreateStringFilter()). How can I create (a) a Report and (b) a Table using that query?
WhereCriterion::CreateStringFilter()
If your ECQuery is composed of criteria matching the format "PropertyName RelationalOperator Value" such as "Width >= 5.0" then:
- Use ReportDefinitionNode::SetRowFilter() to specify the ECExpression string equivalent of your property criteria
- Use DgnECHostSpecification to specify the search class(es) from your ECQuery
- Use ColumnDefinitionNode to define the properties to be displayed in each column, and the order thereof
That will get you a Report.
The TextTableHandler API for generating a table from a report is currently unpublished.
Unknown said:Use ReportDefinitionNode::SetRowFilter() to specify the ECExpression string equivalent of your property criteria
Some of my queries successfully use a Regular Expression. Is there a way to specify a RegEx in SetRowFilter()? Or, is there another mechanism?
SetRowFilter()
Regards, Jon Summers LA Solutions
ECExpressions doesn't directly expose a way to test regexes. It has some less powerful string comparison functions. How complicated are your regexes?
Also you could always consider skipping the Report and just populating the rows of your table from the results of your ECQuery.
Answer Verified By: Jon Summers