HTML 报告解决方案
有哪些好的组件和包可用于根据报告定义生成 HTML 报告? 我有一个真正可怕的项目,其中每个报告都是一个专用的 aspx 页面,该页面构建一个非常大的 HTML 字符串,然后将其分配给“reportBody”标签控件。
标准网格不是一个好的解决方案,因为它们不提供分组功能,但我愿意购买适合分组、打印和导出的网格。 仅供参考,这是我将考虑的一个报告引擎选项。 那里还有什么? SSRS 可能不是一个选项,因为 MSSQL 甚至可能不是一个选项。
顺便说一句,这是一个 ASP.NET 网站。
What good components and packages are available for generating HTML reports based on report definitions? I have a truly horrific project where each report is a dedicated aspx page that builds one fantastically big HTML string, which it then assigns to a 'reportBody' Label control.
Standard grids are not a good solution as they provide no grouping capability, but I'm open to buying a grid that is friendly for grouping, printing, and exporting. FYI is one reporting engine option I'll be looking at. What else is there? SSRS may not be an option, as MSSQL may not even be an option.
BTW, this is an ASP.NET web site.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以尝试 ActiveReports.net
You can try ActiveReports.net
您可以使用i-net Clear Reports(以前是i-net 水晶般清澈)。 它有多种不同的输出格式,如 HTML、PDF、Postscript 等。它可以打印,当然还支持分组。 它是平台无关的。 您还可以将它与 ASP.NET 一起使用。 它支持许多不同的数据库,如 MS SQL、Oracle、MySQL 等。但也可以使用其他数据源。 免费且功能齐全的报表设计器非常易于使用。
此外,其定价远低于水晶报表等其他报表工具。
You can use i-net Clear Reports (used to be i-net Crystal-Clear). It has many different output formats like HTML, PDF, Postscript, etc. It can print and of course it supports grouping. It is platform-independent. You can it also use together with your ASP.NET. It support many different database like MS SQL, Oracle, MySQL, etc. But also other data sources are possible. The free and fully functional report designer is very easy to use.
Also, the pricing is far below other reporting tools such as Crystal Reports.
您仍然可以使用 RDLC 报告,只需在本地模式下构建它们(不需要 SQL SERVER)。 我通常会根据函数调用的结果向 RDLC 报告提供数据,而不是将它们与数据库紧密关联。
you can still use RDLC reports, and just build them in local mode (no SQL SERVER required). I routinely feed my RDLC reports data from the results of function calls rather than have them intimately tied to the database.
DevExpress ASPxGridView 已被证明是完成这项工作的优秀工具。
The DevExpress ASPxGridView has proven to be an excellent tool for this job.
如果您想创建自己的分组功能,我可以给您一些建议。 首先,您可以在 SQL 中使用 ROLLUP 或 COMPUTE 语句或类似语句创建组并使用网格。
我走了以下路线:报告是数据驱动的,因此我知道哪些列可以分组以及哪些列需要计算总计。 我使用标准 DataGrid,并在 ItemDataBound 事件中为需要它的任何列保留运行总计,然后检测组列中的更改。 当检测到时,我插入一个组总计,重置运行总计并插入一个新的组标题。
我在一天之内就制作了一个快速原型。 但是,当您制定出所有小细节以便为报告提供所需的所有功能并使它们看起来恰到好处时,您将花费相当多的时间并最终得到一小堆代码。
If you want to create your own, I can give you some advice. First, you could probably create the groups with ROLLUP or COMPUTE statements or similar in your SQL and use a grid.
I went the following route: reports are data-driven, so that I know which columns can be grouped and which ones need totals computed. I use a standard DataGrid, and in the ItemDataBound event, I keep a running total for any columns that require it, and then detect changes in the group column. When detected, I insert a group total, reset the running totals and insert out a new group header.
I did a quick prototype of this in a day. But by the time you work out all the little details to give the reports all the features they need, and make them look just right, you'll spend quite a bit of time and end up with a small mountain of code.