Solved

filter AX report based on column value

Posted on 2011-02-23
6
981 Views
Last Modified: 2012-05-11

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.
 
0
Comment
Question by:smetechit
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:agusacil
Comment Utility
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.
0
 

Author Comment

by:smetechit
Comment Utility
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.
0
 
LVL 4

Accepted Solution

by:
agusacil earned 500 total points
Comment Utility
Hi,

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.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:smetechit
Comment Utility
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.
0
 
LVL 4

Expert Comment

by:agusacil
Comment Utility
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.
0
 

Author Comment

by:smetechit
Comment Utility
Hi agusacil,

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now