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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


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.
smetechitAuthor Commented:
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.

The code is correct. It should print group subtotal when at least a record is sent within that group. Do you change fetch method or custom the way subtotal is printed (e.g override executeSection method) ?
Check also if you put the correct field in the order by of the report data source.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

smetechitAuthor Commented:
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.
smetechitAuthor Commented:
Hi agusacil,

I am trying to send you XPO with report and table.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.