简体   繁体   中英

C# Class library and Reporting

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM