How do you hide a row in Dynamic AX reports?

There are 4 calculated fields in the section body. I want to hide the row when all four fields are 0. Please let me know your suggestions ...

+3
source share
2 answers

Create the executeSection method in the body and only call super()if you want the section to print:

public void executeSection()
{
    if(value1!=0 || value2!=0 || value3!=0 || value4!=0)
    {
        super();
    }
}
+3
source

In order of simplicity, you can:

  • Add a request range (maybe not possible in your case)
  • Add test to executeSectionreport section method
  • Add test to sendreport method

An example of overriding a sendreport method (in this case, option 1 would be better):

boolean send(Common cursor, int level=1, boolean triggerOffBody=TRUE)
{
    boolean ret;
    InventTable inventTable;

    if (cursor.tableId == TableNum(InventTable))
    {
        inventTable = cursor;
        if (inventTable.InventType == InventType::BOM)
            ret = super(cursor, level, triggerOffBody);
    }

    return ret;
}
+1
source

Source: https://habr.com/ru/post/1775737/


All Articles