Class ReportExpression
- Namespace
- DocWright.Reporting.Expressions
- Assembly
- DocWright.Reporting.dll
A parsed RDL property value: either a literal, or an expression — text beginning with
= — checked, bound and ready to evaluate any number of times.
public sealed class ReportExpression
- Inheritance
-
ReportExpression
- Inherited Members
Remarks
Parse once, evaluate many. Parsing resolves every name and folds every constant, so a report processor parses each expression in a definition once and evaluates it per row. A parsed expression is immutable and safe to evaluate from several threads at once.
What parsing refuses. Everything the reference implementation's compiler would
reject — syntax, undeclared names, wrong argument counts, and constant sub-expressions that
fail such as 5 \ 0 — raises ReportExpressionException with
DXP9101; the reference refuses the whole report for these. Constructs DocWright declines
to evaluate raise DXP9102, and an aggregate whose scope is not a string constant raises
DXP9107, which the reference's compiler also rejects. Names that depend on the report — a field or a parameter —
are checked when the expression is evaluated, because parsing does not know the report.
Properties
- IsExpression
Gets a value indicating whether the text is an expression rather than a literal.
- References
Gets every collection member and custom-code member the expression reads, in order.
- Text
Gets the property value exactly as it was written, including any leading '='.
- UsesAggregates
Gets a value indicating whether the expression uses an aggregate,
RunningValue,Previous,RowNumber,InScope,Levelor a lookup, and so needs a data scope.
- UsesCustomCode
Gets a value indicating whether the expression calls the report's custom code.
- UsesExecutionTime
Gets a value indicating whether the expression reads the execution time — through
Globals!ExecutionTime,Now,Todayor their relatives — and so needs ExecutionTime.
- UsesPageGlobals
Gets a value indicating whether the expression reads
Globals!PageNumber,TotalPages,OverallPageNumber,OverallTotalPagesorPageName, which RDL permits only in a page header or footer.
Methods
- IsExpressionText(string?)
Returns whether RDL reads a property value as an expression: it does when the first character is '='.
- Parse(string)
Parses a property value with the default limits.
- Parse(string, ResourceLimits?)
Parses a property value.
- ToString()
Returns Text.