Hide Zero Total Value in Report

Hi everyone,

I am using AX 2009 and I wizard in creating my report. I created a report that will sum up the total qty ordered of a packing slip to be shipped for the day. I am almost finished until I encountered that my report is showing up zero total qty on top of the body section of my report when I preview it. I am thinking to make a statement on the footer section of executeSection method. Is it possible to make a statement that will hide the total qty field when the value is zero. Please help me!!!

Thanks,

Jeremy

Hi,

You can set the showZero field property to no.

regards,

Thomas

Hi Thomas,

It works, the zero value is now hidden but I set LineAbove property into solid from the qty field. The zero value is hidden but the line remains.

Jeremy

In this case, you should set your field autodeclaration property to yes and in the executeSection() method, add the following code

if(yourField.value == 0)

yourField.visible(false);

It should solve your lineAbove problem. Please verify solution if it solves your problem

regards,

Thomas

Hi Thomas,

When I use “yourField.value” in my if statement or even in an ordinary command, it gives me an error. There is no value property appeared in my field when I tried to scroll down all possible properties in the field dropdown.

Jeremy

Hi Thomas,

Correct me if I’m wrong, I put the line of codes in the executeSection() method of my Footer section of the section group I used.

Jeremy

YourField.value is an exemple, I meant YourTable.YourField, you put your code in the executeSection() method of the the section where your field appear, don’t foeget to set the autodeclaration property to yes and use the NAME of your field in the design view ,not the table field as follows:

if (yourTable.YourField == 0) ==> value stored in datasource

yourFieldName.visible(false); ==> this modifies the visible property of the field that displays your value in design

regards,

Thomas