Cannot implicitly add value to unidentified type.

edited 12:06AM in FastReport .NET
In a report, I have created a total as average of a numeric field.

If Convert Null option is checked, everything works fine. When I unchecked it (the option that I need to use), I get the following error:

FastReport.Net v1.3.14
Cannot implicitly add value to unidentified type.
at FastReport.Variant.op_Addition(Variant subjectVariant, Object value)


Do you know what it means?

Thank you

Comments

  • edited 12:06AM
    One of data rows contains a null value which you are trying to sum. The "Convert null values" option is designed to handle this case correctly.
  • edited 12:06AM

    But it is not consistent with the aggregate functions of any database, including Ansi/ISO standards.
    "Sum" function must ignore nulls, precisely it is one of the good features of working with null values.
    I do not use "Convert null values" in any report, never. null does not mean 0, it means "unknown". If I use "Convert null values", then other functions as Average will not work correctly.
    I would suggest to improve the sum function, ignoring null values. It would not affect your current specifications and it will be more consistent with the industry standards.

    Thank you
  • edited 12:06AM
    I've added check for null & DBNull values. It will be available in the next daily build.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.