How to Create Enum Parameter in SSRS Report in ax 2012

Description:-

When you use Enum as a parameter in reports, it works well within the AX client. However, to deploy it to the Enterprise Portal (EP), the parameter lookup must be built through the AX Enum provider. This recipe will discuss how an Enum provider can be added to a report and used in parameters.

This topic provides the steps to use an Enum type as a report parameter. The collection of enumeration values can then be referenced by the report. For example, from the Facility Management sample for Microsoft Dynamics AX, the room type is stored as an enumeration type. You can add a dataset that binds to the ‘Enum name’ enumeration and restrict the report to display a specific room type, such as Cubicle. You will create the dataset as an AX Enum Provider data source type so that the Enum parameter can be accessed from Enterprise Portal in addition to the Microsoft Dynamics AX client.

Creating an Enum Type Parameter
To create a parameter of type Enum, you must have the following:
  • Create ENUM from Data Dictionary Node.
  • Give style property to Radio button.
  • Give UseEnumValue Property to Yes.
Now create Contract class and create Enum parameter method for pass parameter value to ssrs report like below.
I have create SalesInvoiceRegister Enum value and Add following Element in SalesInvoiceRegister Enum and set above property in SalesInvoiceRegister Enum.
  • All
  • Customer
  • Sales Category
After I have used SalesInvoiceRegister Enum in Contract class like below.

Public SalesInvoiceRegister ParmSalesInvoiceRegister (SalesInvoiceRegister _ SalesInvoiceRegister = SalesInvoiceRegister)
{
    SalesInvoiceRegister = _ SalesInvoiceRegister;
    Return SalesInvoiceRegister;
}

  • Create Data Procedure class for assign your logic.
  • Create SSRS Report design and deployed it.
  • You’re Enum Parameter will look like below in SSRS Report.

Related Posts

Previous
Next Post »

Thanks for comments.....