AX2012 Create SSRS Report using Data Provides Classes

1. Create the Contract  Class first,
A. This class is used to create parm methods for the reports, So if you have any parameters that you want to pass to report then create parm methods for those as data members.
B. SRSReportParameterAttribute attribute to specify the data contract class that defines the report parameters for the report.

2. Create Controller class which extends SrsReportRunController
A. SrsReportRunController : Through this class we just create the Main method where you have to define the reportname and design and this was the method which will calls the report to execute. Starting point of the report.
B. prePromptModifyContract :- If you want to pass the values for the report before prompting to user for input you can override this method

3. Create DataProvider class which extends SrsReportDataProviderPreProcess.
A. Override the method ProcessReport where you will write the business logic to fill into the tmp table
B. Override the postbuild function to bind the lookups for the fields.
C. SRSReportQueryAttribute attribute to specify the query to use to get the data for the report.

4. Create UI Builder Class which extend SrsReportDataContractUIBuilder
This Class is used to define the layout of the parameter dialog box that opens before a report is run in Microsoft Dynamics AX. It is used to add the customization as well as additional fields in the dialog.
Following are the scenarios where UI Builder Class can be used:
1. Grouping dialog fields
2. Overriding dialog field events
3. Adding a customized lookup to a dialog field
4. Binding dialog fields with Report contract parameters
5. Changing the layout of the dialog
6. Adding custom controls to the dialog

5. SysOperationContractProcessingAttribute(classStr(SSRSDemoUIBuilder))
it will link the UI Builder Class with the contract class.

Comments