How to Use a Programmable Section in Reports in Dynamics AX

We can use programmable sections to add any kind of customized information for example : sum of fields in the report .
To activate a programmable section, activate it explicitly with an element.execute(Number) statement. The Number must be specified in the ControlNumber property for the design section.

For example, I’ve created a prgrammable section calculating the sum of a column in dynamics ax .
To call this section , I add the method element.execute(1); in the fetch method after calling super() and before returning the result of the fetch

public boolean fetch()
    boolean ret;
    ret = super();
    return ret;