Function that can fill the null cell with the value with the upper cell

Posted by: joomin.lee on 8 July 2021, 10:58 am EST

    • Post Options:
    • Link

    Posted 8 July 2021, 10:58 am EST - Updated 3 October 2022, 8:11 am EST

    Hi, Always appreciate for your kindly reply.

    Now, I am making a table report as using ActiveReports JS.

    In the meantime, I have a question as below.

    There are some cells which the values are empty(null).

    I want to fill those cells with the value which is located right above empty cells.

    Is there a function that can make it?

    Please let me know.

    Thanks in advance.

  • Posted 8 July 2021, 11:03 am EST

    I will edit the title as below.

    Function that can fill the null cell with the value “with” the upper cell

    → Function that can fill the null cell with the value “of” the upper cell

  • Posted 9 July 2021, 5:10 am EST

    You can use the “Previous” function:

    https://www.grapecity.com/activereportsjs/docs/ReportAuthorGuide/Expressions/Functions/miscellaneous#previous

    For example, the following expression shows the previous value of field “a”.

    {IIF(a is Null, Previous(a), a)}
    
  • Posted 13 July 2021, 3:01 am EST - Updated 3 October 2022, 8:11 am EST

    Thanks for the reply.

    Anyway, eventhogh I used the function that you let me know, I could not fill the ‘null’ cell.

    Below is the function that I used as.

    {IIF(pcell_ss_rsrp_avg is Null, Previous(pcell_ss_rsrp_avg), pcell_ss_rsrp_avg)}
    

    If you know the method, please let me know.

    Attachment #1 : Desinger Mode

    Attachment #2 : The report I exported on Preview Mode.

  • Posted 13 July 2021, 5:30 am EST

    Okay, so the “Previous” function only works once, but if there are two subsequent null values, then only the 1st one will be filled with the previous value. That’s by design. There is no functionality that would allow achieving what you described.

  • Posted 13 July 2021, 5:58 am EST

    Ok, I got it.

    Thanks for the reply. :slight_smile:

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels