Menu

#20 First function doesn't work for non-numeric values

open
nobody
7
2005-08-28
2005-08-28
No

The First(...) function doesn't work for non-numeric
values. Looks like it is doing numeric type-checking.

The example has a TextBox with expression
=First(Fields!country.Value) in the list body. The
following exception was thrown:

System.Exception: The items that are summed must be a
number.
at
OpenRdl.ReportProcessing.Function.NumericalAggregateFunction.TypeCheck(PrintContext
context) in
C:\develop\OpenRdl\src\OpenRdl\OpenRdl.ReportProcessing\Function\NumericalAggregateFunction.cs:line
67
at
OpenRdl.ReportProcessing.Function.FirstFunction.Evaluate(PrintContext
context) in
C:\develop\OpenRdl\src\OpenRdl\OpenRdl.ReportProcessing\Function\FirstFunction.cs:line
49
at
OpenRdl.ReportProcessing.Parser.Expression.ExpressionEvaluator.Evaluate(Expression
expression, PrintContext context, String
expectedDataType) in
C:\develop\OpenRdl\src\OpenRdl\OpenRdl.ReportProcessing\Parser\Expression\ExpressionEvaluator.cs:line
73
at
OpenRdl.ReportProcessing.ReportItems.Textbox.Layout(PrintContext
context) in
C:\develop\OpenRdl\src\OpenRdl\OpenRdl.ReportProcessing\ReportItems\Textbox.cs:line
84
at
OpenRdl.ReportProcessing.ReportItems.List.Layout(PrintContext
context) in
c:\develop\openrdl\src\openrdl\openrdl.reportprocessing\reportitems\list.cs:line
137

Discussion

  • Warrick Flower

    Warrick Flower - 2005-08-28

    Report demonstrating error with First function

     
  • Warrick Flower

    Warrick Flower - 2005-08-28

    Datasource to go with Publishers.rdl

     

Log in to post a comment.