开发者

C# Class library and Reporting

开发者 https://www.devze.com 2023-02-16 10:34 出处:网络
I am building a big system, which i have divided in three tiers, UI, Class-Library, and Database. Database stores all data only, and Class-Library provides all functionalities and business logic.

I am building a big system, which i have divided in three tiers, UI, Class-Library, and Database. Database stores all data only, and Class-Library provides all functionalities and business logic. And 开发者_运维百科UI is the User-Interface.

The issue which i face is: how to integrate the reporting in this situation. I am using C# for class-library, and windows-forms-in-C# for UI. I intend to use rdlc Microsoft reports.

My strategy at this point is: Let every object add its own data in a dataset, which will be then returned to the UI for display in report.


It seems to me that the reports are just another UI. Your business logic for what data to return for a given report should live in the class library. The reporting business objects would probably live in a namespace of their own (Appname.Reporting). I think I would have an abstract report class that provides a skeleton for most properties and methods that a report would need, and subclass that skeleton for each individual report. Thus, one class per report, but all derived from a generic class.

0

精彩评论

暂无评论...
验证码 换一张
取 消