Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


filter AX report based on column value

Posted on 2011-02-23
Medium Priority
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.
Question by:smetechit
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Expert Comment

ID: 34961427

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.

Author Comment

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.

Accepted Solution

agusacil earned 2000 total points
ID: 34968180

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.
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.


Author Comment

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.

Expert Comment

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.

Author Comment

ID: 35146953
Hi agusacil,

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part II
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

730 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