web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Hide parameters in report dialog

(0) ShareShare
ReportReport
Posted on by 302

Hi,

I am implementing new Report from the scratch using a RDP class. I use a controller class, a contract class to get recId and tabledID when is called from a form. Depend on the tableID I need to retrieve some information or another. For that I use preRunModifyContract. It works fine. Maybe exist a better way to achieve that.

the problem is when I execute the report, the system display a form (see below) to choose printer or whatever. In that form the contract parameters are shown. I don't want that because they are for internal purpose. Exist any way to hide that fields / parameters?

for contract I created this methods:

[
DataMemberAttribute('tabledId'),
SysOperationLabelAttribute(literalStr('tableId'))
]
public TableId parmtableId(TableId _tableId = tableId)
{
tableId = _tableId;
return tableId;
}
[
    DataMemberAttribute('recId'),
    SysOperationLabelAttribute(literalStr('recId'))
]
public RecId parmrecId(RecId _recId = recId)
{
    recId = _recId;
    return recId;
}

If I comment the DataMemeberAttribute the values for tableid and recId are not stored but they are not shown in the form. I am bit stacked.

thank you

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Decorate the method with SysOperationControlVisibilityAttribute(false).

    By the way, you don't need SysOperationLabelAttribute if it isn't visible.

  • Verified answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    Martin is right you should change your contract class methods like this.

    [

     DataMemberAttribute('tabledId'),

     SysOperationControlVisibilityAttribute(false)

    ]

    public TableId parmtableId(TableId _tableId = tableId)

    {

      tableId = _tableId;

      return tableId;

    }

    [

      DataMemberAttribute('recId'),

      SysOperationControlVisibilityAttribute(false)

    ]

    public RecId parmrecId(RecId _recId = recId)

    {

      recId = _recId;

      return recId;

    }

    Or, you can also go to the visual studio and change the parameter's visibility property value to hidden.

    8637.Capture.PNG

  • Roger M. Profile Picture
    302 on at

    Is this assumtion  valid for SalesQuotationReport which has a different kind of form (specially in journal)? I tried with no success.

    Thank you

  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    You mean the parameter visibility? Yes that is valid in case of all reports.

    In the Sales Quotation report parameters are there but parameter dialog is not shown at all. So you don't see anything altogether. What exactly did you try?

  • Roger M. Profile Picture
    302 on at

    Hi Zain,

    Basically the user should decide if he wants company logo on the report by clicking checkbox and decide what kind of technical information wants to display (brief, normal, comprensive) in quotation. The categories corresponds to enum. I guess the system should create a combobox. But it is a user decision. I has no automatic criteria to decide that. And create a menu option for each combination could be too much.

    thank you

    best regards

    Roger

  • Suggested answer
    Long.Thai Profile Picture
    130 on at

    Hi Roger M,

    You can try to override method showDialog() in contract class and set return value = false.

  • Zain Bokhari Profile Picture
    3,208 Moderator on at

    Hi Roger,

    Actually sales quotation report has a bit complex process. Like you see the on the click method of the Print buttons on Quotation Journal, there is another method "launch report" on the form which is called instead of a direct call to SalesQuotationConttroller if Project 3 configuration is enabled.

    I'm afraid you will have to dig in and trace where the parameter dialog options can be enabled if possible. Or wait for someone who has worked on the same issue and can guide you on this. :)

  • Roger M. Profile Picture
    302 on at

    Contract has no showdialog method.

  • Roger M. Profile Picture
    302 on at

    In the case we use SalesQuotationReport it seems this way doesn't work. Do you know how to populate parameters in SalesauotationReports or SalesInvoiceReports? They lookslike a bit different than standard RDP Reports. thank you

  • Zain Bokhari Profile Picture
    3,208 Moderator on at

    Roger please post a new thread with that question and detail for where exactly is it that you need help, so everyone can help.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans