Fixed asset statement rows

Hi,

I am new to this forum and dynamics ax. I have a question about fixed asset statement report. I have set up some rows in the fixed asset statement rows but I would like to display them on report only when the chekcbox “drill down” is marked on the dialog. Is this possible to do it ? Maybe there is a way to display the rows automatically, please give me some sugesstions.

Do you have access to the APMJobTable report in the Reports section of AOT?

This fulfills your requirement, and will show you how to use the dialog correctly - I always find it easier to work from an example rather than someone elses code, and it gives you the correct naming conventions, best practices etc…

Thank you for your quick reply.

Unfortunately, I do not have access to the APMJobTable report in the Reports section of AOT. Are there any other reports that I could use as an example?

I will try explain it, its just easier to have a working example - the APMJobTable does exactly as you require but I don’t know of any other reports that do that.

In short you need a display method for each “section” you want to show - this goes in main method area of the report, as follows;

public display NoYes showObjectDescription()
{
;
return showObjectDescription;
}

Then you need to modify your dialog to add the buttons which will either be ticked or not ticked to show the section;

public Object dialog(Object _dialog)
{
Dialog dialog;
;

dialog = super(_dialog);

dialog.addGroup("@SYS8335");
dlgShowOptions = dialog.addFieldValue(typeId(NoYes), showOptions, “@SYS321”);

return dialog;
}

Then you need to capture the value of the variable in the fetch method of the reports while loop, then execute a programmable section;

if (showOptions)
{
element.execute(5);
element.execute(6);
showOptions = false;
}

In the actual report design you need to create programmable sections - these are your sections that will be hidden / shown based on user request, and these are what the fetch method executes. NOTE: Ensure that your ProgrammableSection numbers are in correct order, for example the code above is firing ProgrammableSection(5), this will fire the ProgrammableSection(5) in your report.

I am grateful to you for your help. I have done it as you described above and it almost worked. I mean when the checkbox is ticked the report shows what I wanted and expected. But when the checkbox is not ticked the output is not good because it shows all the records that should be displayed plus the last one record from the list which should not be included. Let me illustrate that by example, we have got following records in the AssetStatementRow table.

  1. Fixed Asset A

a) FA_1

b) FA_2

  1. Fixed Asset B

When the checkbox is ticked it shows what I have just written above. When the checkbox is not ticked it should not displayed a) and b). Unfortunately it shows:

  1. Fixed Asset A

b) FA_2

  1. Fixed Asset B

Could you give me some advice what is wrong, please?

Thank you.

Try adding a condition that if the “show” button is not ticked then you return ’ ’ (Blank).

It did not help. I was trying to add disableSection method to my conditions but I do not know why but it sometimes replaced order of the records or do not show them. Maybe I should filter data depends on the checkbox. If the checkbox is not ticked there is no many records to display. Otherwise it is a few times more records to display.
I use all the records that contain AssetStatementRow table and depends on conditions I am trying to display them.

William - thank you for your help.

I am writing to finish this topic. I have created another query and filtered data based on checkbox condition. The result of the operation does not contain unexpected records that I had gotten using disableSection method without filtering data.

Hi all,

could someone please tell me why I see positive value in column ‘Acquisition this year’ in the report Fixed asset statement, when I have negative value in the system, and I also see negative value in the code, during executing this report?

Thanks