Search This Blog

Thursday, 16 April 2015

Creating Multi Select lookup in SSRS reports in Microsoft Dynamics AX 2012

In this tutorial I share you the steps of creating the multi select lookup.

Below is the screen shot of the multi select lookup of how its looks like.



















First of all we need to create the parm method in the contract class for this multi select company lookup.

As you can see this in the below image.







After that we need to bind the control to this parm method of multi select company lookup to the dialog box in the build method of the UI Builder Class.













After  that in the postRun method of the UI Builder Class we are calling the another method that we have created to create the lookup on the companyField Control.










Below is the definition of this companyLookup method.








In the above code the selected field container contains the fields which are selected by default when the lookup is open.You can also show the empty container if not to show any field selected by default.

This was all related to the multi select lookup in SSRS Reports.

If you have any question related to that than feel free to approach me.

Thanks

Muhammad Zahid.

Thursday, 9 April 2015

Using Radio Button Control for RDP Based SSRS Reports in Microsoft Dynamics AX 2012 part 2

This is the second post related to the radio button control for RDP Based SSRS Reports.

In this post we will learn on creating the radio buttons using the enum with style property set to combo box.

below is the screen shot of the enum with style property set to combo box.








Below are the steps for creating the radio buttons from the enums of style type combo box.

First of all declare the following variables in the class declaration of the UI Builder Class.








After that write the following code in the build method of the UI builder class.





After that write the following code in the post run method of  the UI builder class after the super() method.





The above code is basically registering the override modified method on the selection change of the radio buttons.

Below is the definition of this reportTypeModifiedMethod











The above method is basically enabling and disabling the custAccount lookup on the selection change of the radio buttons.

Now after doing all of this please refresh the datasource node of the report on visual studio to see the parameters reflected there.

After running the report the parameters looks like this.













On the selection of "EEO prepartion" the custAccount lookup will gets disable as our reportTypeModified method that we have discussed previously is doing this.













One thing we noted here is that there is no need to create the contract method of the enum if the style of the enum is combo box.

This was all related to the creation of radio buttons from the enum having style = combo box.

Feel free to comment if you need further info on this,

Thanks

Muhammad Zahid. 

Using Radio Button Control for RDP Based SSRS Reports in Microsoft Dynamics AX 2012 part 1

Radio Buttons are created on the report parameter through the enums.

There are two scenarios.IF the style of the enum property is radio button than code is different and if the style of the enum property is combo box than code will be different.

First I will give the example of  the enum which have style property set to radio button:

Below is the screen of the enum with style property set to radio button:









First we have to create the parm method for this enum in the contract class.

Below is the screen shot for this.







Than in the build method of the UIBuilder class we need to add the following code to show the radio button control on the dialog:












Now in the postbuild method of the UI builder class I am getting the bind control and registering a method on the selection change of this control.











the type of dialogFieldFilterBy is DialogField.I have declared this in the class declaration.

Now the method that I have registered in the this control will enable disable some other controls based on the selection change of the radio control.

Below is the definition of this method that I have registered.
















After  doing all of this just refresh the datasources on the designer node of this report in visual studio so that parameters should appear in the parameters not of report.

Now after running the report the checkbox control appears like this:



















Now on the selection change of this radio control the method will be called that we have registered previously i.,e filterbymodified

Now when I select the ProjectQuotation from the radio button ItemGroupId and ItemId will be disabled and Project Field will be enable due to the execution of the code in the registered method.

As you can see this in the below image.



















This was all related to the radio button in SSRS reports using the enum with style property set to radio button.

In the next post I will give the example of  creating the radio buttons with enum with style property set to combo box.

Thanks

Muhammad Zahid.