.NET 中的动态报告(由用户添加和删除字段)

发布于 2024-12-07 17:54:48 字数 526 浏览 2 评论 0原文

我有一个 .NET (C#) 报告应用程序,它从数据库检索数据、转换数据并生成报告。

其中一些报告涉及复杂的业务逻辑处理、数据拆分和分组,还有一些报告需要复杂的格式设置(Excel 中的多个工作表)。

报告以各种格式生成,包括文本文件、Excel 工作表等。有一项新要求是让最终用户能够自行更改报告,而无需开发人员参与(他们应该能够进行简单的更改,但显然任何计算字段都必须由开发人员添加),并且还要使设计通用,以便可以轻松添加新报告,而无需从头开始构建。

通用设计至少应该支持简单的报告。只是想知道是否有一个工具已经支持这些功能?

我可以使用 SQL Server 报告服务来实现此目的吗?

能否使用 SQL Server 报告服务将数据绑定到对象集合而不是存储过程中的数据集?或者有其他工具可以支持我的要求吗?它还应该支持为最终用户提供自行更改报告的能力(或者如果可能的话甚至构建新报告)。这是一个重要的要求。

如果我必须自己构建这个,有什么设计模式可以使用吗?

I have a .NET (C#) reporting application that retrieves data from database, transforms it and generates reports.

some of those reports involve complex business logic processing, splitting and grouping of the data and some reports require complex formatting (several worksheets in excel).

reports are generated in various formats including text files, excel sheets etc. there is a new requirement to give the ability to end users to make changes to the reports themselves without involving the developer (they should be able to make simple changes, but obviously any computed fields will have to be added by the developer) and also to make the design generic so that new reports can be added easily without having to build it from scratch.

The generic design should support the simple reports at least. just wondering if there is a tool that already supports these features?

can I use SQL Server reporting services for this?

Can SQL Server reporting services be used to bind the data to object collection rather than a dataset from a stored procedure? or is any other tool that supports my requirement? it should also support providing the ability to end users to make changes to the report themselves (or build even new reports if possible). this is an important requirement.

if I have to build this on my own is there any design pattern I can use for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

如梦亦如幻 2024-12-14 17:54:48

关于 Sql Server Reporting 服务,是的,它支持除自定义对象集合数据源之外的所有内容。 此链接包含 SSRS 支持的所有数据源的列表。

如果报告要使用来自 RDBMS(例如 SQL Server、Oracle 等)的数据,我认为这没什么大不了的。您很可能能够通过查询或存储过程以您需要的方式生成任何输出。

编辑

忘记提及SSRS有一个非常丰富的API,允许您以编程方式发现报告参数,将它们传递给报告并执行它。我开始使用 COGNOS 和 SSRS,至少在表面上比较非常好。但同样,我刚刚开始使用 COGNOS,因此我无法过多介绍该产品的高级功能。

In regards to Sql Server Reporting services, yes, it supports everything you need except for the custom object collection data source. This link has a list of all Data Sources supported by SSRS.

If the reports are to consume data from an RDBMS such as SQL Server, Oracle, etc, I don't see this as big deal. Most likely you'll be able to produce any output in the way you need it either through queries or stored procedures.

EDIT

Forgot to mention that SSRS has a very rich API that allows you to programmatically discover report parameters, pass them to the report and execute it. I am starting to use COGNOS and SSRS, at least on the surface, compares very well to it. But again, I'm just starting with COGNOS so I can't really say much about advanced features of the product.

木落 2024-12-14 17:54:48

ActiveReports 是一个与数据源无关的报告工具,功能丰富。它确实还包括在您自己的应用程序中嵌入和自定义报表设计器的能力,这将允许您为用户提供一些报表编辑功能。

ActiveReports is a datasource-agnostic reporting tool that is very feature filled. It does include the ability to embed and customize the report designer in your own application as well which would allow you to give your users some report editing capabilities.

傲影 2024-12-14 17:54:48

您绝对应该查看 List &也加上标签。它适用于所有数据源,最终用户设计器非常先进且易于使用。即将推出的版本 17 进行了一些改进。我们长期以来一直在使用该工具,并且我们一直对结果感到满意(以及我们的客户;-)

you should definitely have a look into List & Label too. It works with every datasource ever and the end user designer is very advanced and simple to use. Upcoming version 17 got some improvements. We are working since a long time with that tool and we have always been satisfied with the results (and our clients, too ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文