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.
For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.
Related articles
- Dynamics Ax 2012 reporting cookbook for SSRS – Dynamics Ax 2012
- SSRS Tip: Speed up RDP based SSRS reports testing in Dynamics Ax 2012
- SSRS tip: No row message in Dynamics Ax SSRS 2012
- SSRS tip: Take care that VS and AX client are in the same layer for SSRS – Dynamics AX 2012
- SSRS tip: How to set the page size for a SSRS report in Dynamics Ax 2012
- SSRS Tip: Using labels for dynamic texts in SSRS reports – Dynamics Ax 2012
- Microsoft Dynamics AX Architecture (teamaxapta.wordpress.com)
*This post is locked for comments