SUM formula gives =#N/A when no row in the list using StandardFormulaProcessor

Issue #30 resolved
gökhan öner
created an issue

When using lists, in some cases, some of them can be empty. and if there is a SUM formula, StandardFormulaProcessor is calculate it as =#N/A.

Comments (9)

  1. leonate NA repo owner

    To be able to investigate this in detail I need a complete working sample demonstrating the issue.

    But as a first suggestion I recommend you to replace the formulas in your template to use no $[] notation.

    So instead of $[SUM(G8)] use regular Excel formula notation =SUM(G8)

  2. gökhan öner reporter

    Attached a project and a result excel. Because I have 4 grid in a sheet, I cannot change the formulas to regular excel ones otherwise the grids on the second line will produce wrong results.

    I thing: When I not set Standart Formula Processor, SUM formuas with no rows calculate correct, 0. But of course, in that case, other calculations are wrong.

  3. leonate NA repo owner

    It is very difficult to find the root cause of the issue in such a complex sample and it will take too much time. It would be good if you could put together a smaller example demonstrating this problem.

  4. leonate NA repo owner

    This is now fixed in the master branch. If the formula cell references are not generated during the processing then the formula value will be set to 0.

    There is also a way to specify custom default value using jx:params comment

    jx:params(defaultValue="1")
    
  5. Log in to comment