Home > Ax 2012, Ax Technical, Dynamics Ax, SSRS Reports > SSRS Tip: Using invisible parameters in contracts – Dynamics AX 2012

SSRS Tip: Using invisible parameters in contracts – Dynamics AX 2012

September 18, 2013 Leave a comment Go to comments

There can be cases where you wanted a contract in the attribute but do not want the UI builder to expose it to the user. The reporting framework in AX provides a very easy way to incorporate this.

Open the parm method in the contract that you don’t want to expose. Add the attribute shown here along with other attributes. This attribute when found in the parm method will automatically prevent the UI builder from adding this to the dialog.

[DataMemberAttribute, SysOperationControlVisibilityAttribute(false)]
public LogisticsAddressing parmAddress(LogisticsAddressing _address = companyAddress)
{
companyAddress = _address;
return companyAddress;
}

This feature comes as a part of the BOF, see here http://j.mp/185ufd2

Update: Apologize for the wrong statement here. The only way to make a parameter visible when using the contract with reporting framework is to specify it in the design. This is because the contract class \Classes\SrsReportRdpDataContractInfo\buildMemberAndNestedObjectMap – 29 ignores this attribute and reads the design RDL (created using your VS) to decide if a parameter must be visible in the contract. So to hide your parameter open the parameters node in Visual studio and then set the visibility property to hidden.Also a point to understand is that the VS design overrides any specifications at the contract level for properties like  LableHelp, Visibility, grouping, HelpText, value type (multivalue) etc. (Ref: \Classes\SrsReportRdpDataContractInfo\fillReportDesignProperties). Thanks to a AXForum member who pointed this out.

2013-09-30_1910

For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.

7720EN_MockupCover_Cookbook

  1. Sebastian Draese
    October 13, 2016 at 8:07 pm

    You can also use a not defined group
    SysOperationGroupMemberAttribute(‘group_notdefined_at_classdeclaration’)

    the group ‘group_notdefined….’ will not be shown on the dialog, so all members are
    invisible

    • December 1, 2020 at 8:50 am

      Thank you. This solved my problem.

  1. September 30, 2013 at 3:03 pm
  2. September 23, 2013 at 7:45 am

Leave a comment