Microsoft Dynamics 365 Blog

A report is made in generated design. When printing this report it is not possible to print query information as such an option (ie print options) does not exists for generated designed report. It exists only for auto designed report.

This means that query information does not get printed in generated design.

It is due to the fact that as per AX design when using generated design, in SysQueryForm, method buildForm , the print options tab is set to invisible.

A workaround is to make the following changes within the method \Forms\SysQueryForm\Methods\buildForm

if (sysQueryForm.isReport()) // If this query has a report running.
  if(sysQueryForm.hasGeneratedDesign()) // If the report has a generated design then show
  { // only the tree fist columns in the sortingTable.
    sorting_ds.object(fieldnum(TmpSysQuery, AutoSum)).visible(false);
    sorting_ds.object(fieldnum(TmpSysQuery, AutoHeader)).visible(false);
    // Workaround Start
    if (!sysQueryForm.hasReportTemplate())
    } // Workaround Stop } else // SYP-Modification HQ-731-825-ND5C (SP1) { if (!sysQueryForm.hasReportTemplate()) { printRangeBox.enabled(false); } } }

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!