Link to home
Start Free TrialLog in
Avatar of smetechit
smetechit

asked on

filter AX report based on column value


I want to filter axapta report to display only records with QTY !=0 . The field QTY is based on display method . I could acheive this by overriding send method. The problem now is that if the last record in the section has QTY=0, then the subtotal is not displayed.
 
Avatar of agusacil
agusacil
Flag of Indonesia image

Hi,

How do you construct the subtotal? If you use standard way of creating subtotal (i.e. when using auto design : add sorting field and check box group totals is checked; or when using generated design : having section footer under the section group) then you should have subtotal printed when at least one record sent on that group.
It might be useful if you could paste in your code.
Avatar of smetechit
smetechit

ASKER

I use generated design, my code is listed below

public boolean send(Common _cursor, int _level=1, boolean _triggerOffBody=TRUE, boolean _newPageBeforeBody=FALSE)
{
    boolean ret;

    if (this.Qty() ==0)
        return true;

    ret = super(_cursor, _level, _triggerOffBody, _newPageBeforeBody);

    return ret;
}


I think my problem could be solved if I can add this condition; if last record in the group then send it regardless QTY value.
ASKER CERTIFIED SOLUTION
Avatar of agusacil
agusacil
Flag of Indonesia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My problem if the last line QTY == 0, the line does not apper as wanted, but the subtotal does not appear as not wanted. I am searching for a way to detect the last line in group and omit this check, so it will print regardless of its QY value to make sure the subtotal will print.

I did not change fetch method and need help.
I don't see anything wrong based on what you explain.
If you could attach the xpo and sample data then perhaps I can examine the problem. If you could, make sure rename your object and sample data to make sure you don't disclose confidential information.
Hi agusacil,

I am trying to send you XPO with report and table.