-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update
By :

Among the customizations done in a report, one of the most common is to disable certain report controls by context. This recipe will showcase how to hide a report control in the report design using the context.
Create a new report in Visual Studio with the CustTable query as the data source.
Add an auto design and drag the data source to the design.
In the Parameters node, add a new parameter of type Boolean and call it HiddenParm. Set its properties as follows:
Property |
Value |
---|---|
Nullable |
True |
AllowBlank |
True |
Default Value |
False |
In the Designs node, navigate to the control which must be toggled based on the flag. In the Properties window, set the visible property through expression to point to the newly added parameter using the following expression:
=Not(!Parameter.HiddenParm.Value)
The next step is to set this flag from the controller based on the context. To do this, navigate to the controller class and in the preRunModifyContract
method, access...
Change the font size
Change margin width
Change background colour