Dynamics 365 FO - SSRS Report - Microsoft Dynamics 365 Vietnam

Microsoft Dynamics 365 Vietnam

Song Nghia - Microsoft Dynamics 365 Vietnam

Breaking

Saturday, September 17, 2022

Dynamics 365 FO - SSRS Report

 Dynamics 365 FO - SSRS Report

Nghia Song -  Microsoft Dynamics 365 Technical Consultant

Nghia Song

Tel - WhatsApp: +84967324794

Email: songnghia.uit@gmail.com

  1. Definition

Dynamics 365 SSRS Report development

-What is MVC?

Model-view-controller (MVC) is a pattern used to isolate business logic from the user interface.

Model: Responsible for retrieving data and for business logic, this can included queries, data methods, or other classes that are designed toretrieve data.

View: Responsible for the User Interface, this can also be thought of as the design for the report.

Controller: Orchestrates the flow between Model and View

MVC-Process (1)

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKruURo8FF9w-8shYmaIKsHh2SGibWkpKdVVNx-LdM3ecwoGO7bwSchh4LSHor3o6hi3a90kzR0cv0zotJLirCMUnYzVDxJsPt3SLHdZWL-k17UVvfOXsBzUTLyM8RRcoskImUvh3whq4/s320/SSRSDocument4.JPG

Dynamics 365 FO SSRS Report will have some components:

  • Controller, Data Contract, Report Data Provider: develop in AX AOT

Controller: controller is a class extend from SrsReportController, this class is used to define the reportname and design, default value for filter parameter and this was the method which will calls the report to exectue

class VtvCustomerPurchaseHistoryController extends SrsReportRunController

{


}


Data contract: Contract  is a class with some DataMemberAttribute, 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.

[DataMemberAttribute('Reason') ]

public Description parmReason(Description _reason = reason)

{

    reason = _reason;

    return reason;

}


Report Data Provider: data provider is a class extend from SRSReportDataProviderBase, this class will collect all filter parameter in contract, and query/select data as your calculation, and transfer all data to ssrs report to format and display report at the end.

public class VtvCustomerPurchaseHistoryDataProvider extends SRSReportDataProviderBase

{


}


SSRS report : develop in Visual Studio where you can design layout, grouping, table, …

Next: Dynamics 365 FO - Create SSRS Report with MVC https://www.songnghia.com/2022/09/dynamics-365-fo-create-ssrs-report-with.html

No comments:

Post a Comment