Solved

filter AX report based on column value

Posted on 2011-02-23
6
983 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
ID: 34961427
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
ID: 34967605
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
ID: 34968180
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:smetechit
ID: 34993734
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
ID: 34995268
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
ID: 35146953
Hi agusacil,

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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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