레트로코딩토끼토끼

D365_VisualStudio | SSRS(1) - 기본 Report 생성 본문

Dynamic365

D365_VisualStudio | SSRS(1) - 기본 Report 생성

쌉T타임 2025. 4. 27. 12:42
Report 틀 생성

0. 조회 데이터 추가
1. Contract
2. Temp Table
3. Data Provider
4. Report
5. Controller
6. Output Menu Item
7. Form Extension

Deploy Report 필수!!

 

VS Solution : EDU_0224

PATH : Inventory management > Periodic tasks > Quality management > Quality orders

참고 : How To Create A D365 SSRS Report - Dynamics 365 Musings

 

0. 조회 데이터 추가 (데이터가 없는 경우)

Inventory management > Inquiries and reports > Transaction – ‘Quantity’ 값이 있는 아이템으로 Quality orders에 데이터 추가(BA3278)

View derails 선택

 

Header, Line에 테스트 데이터 추가

 

콤보박스에 추가된 데이터

 

Header, Line에 테스트 데이터 추가

 

데이터 추가된 건 SSMS에서 확인

 

 

1. Contract 클래스 생성 - EDU_SSRSReportContract

[DataContractAttribute]

  • 파라미터로 전달할 변수 설정

 

2. Temp Table 생성 - EDU_SSRSReportTmp

 

3. Data Provider 클래스 생성 (조회 로직 작성) - EDU_SSRSReportDP
  • [SrsReportParameterAttribute(classStr(~ Contract))]
  • class ~ extends SRSReportDataProviderBase

 

4. Report 생성 - EDU_SSRSReport
  • Dataset 추가
  • Query에서 DP 추가
  • Design > new > Precision Design

 

5. Controller 생성 - EDU_SSRSReportController
  • class ~ Controller extends SrsReportRunController
  • main class : Report 지정
  • prePromptModifyContract() : 파라미터 값 가져오기

 

6. Output Menu Item
  • Object Type ‘Class
  • Object ‘EDU_SSRSReport Controller

 

7. Form Extension
  • 기존 InventQualityOrderTable Extension하여 버튼 추가 -> Menu Item 지정

 

8. Report Design
  • Report 우클릭 > Report Properties > Centimeters

 

A4 Size, Margin 0 지정

 

데이터  Drag&Drop

 

  • Format(First(Fields!ValidateDateTime.Value, "InventQualityOrder"), "yyyy-mm-dd") Expression -> 날짜 형태 변경(3/1/2025 2:12:12 AM -> 2025-03-01) 

 

Controller로부터 가져온 데이터

 

  • Report 우클릭 > Deploy Report : 리포트 업데이트

 

업데이트 완료

 

Result