在 ASP.NET MVC 2 应用程序中从 Sql Server 创建 pdf 报告?

发布于 2024-10-06 06:39:38 字数 439 浏览 0 评论 0原文

我希望能够以某种方式从 MVC 应用程序中的 Sql Server 数据库中获取报告。我本可以开发一种方法来使用 xml 来做到这一点,然后将其转换为 fo 并通过 fo 处理器将其呈现为 pdf。但这需要能够在 Web 服务器上安装 fo 处理器,而我正在使用 Web 主机,所以这可能行不通。

所以我到处都看到了Reporting Services 的提及。这是否包括创建 pdf 的可能性?如果是这样,如何在 MVC 应用程序中使用它?我之前尝试过将 Web 表单混合到 MVC 应用程序中(如果这是必要的,正如我所看到的暗示的那样),但无法使其工作。路由似乎无法识别 Web 表单页面...

或者是否有其他更简单的方法从 Sql Server 数据创建 pdf 报告?我还应该提到,我只使用 Linq (和实体框架)来访问数据,因此希望有一个解决方案不需要我了解 Sql 存储过程等...

任何帮助表示赞赏!

I want to be able to somehow get reports out of my Sql Server database in an MVC application. I could have developed a way to do that using xml and then transform it to fo and rendered it via an fo processor to pdf. But that would require being able to have the fo processor installed on the web server, and I'm using a web host, so that's probably not going to work.

So I've seen Reporting Services mentioned here and there. Does that include the possibility to create pdfs? And if so, how do you use it in an MVC application? I tried before to mix webforms into MVC application (if that's necessary as I've seen implied) but couldn't make it work. The routing didn't seem to recognize the web form page...

Or is there any other easier way to create pdf reports from Sql Server data? I should also mention that I only use Linq (and the Entity Framework) to access data, so hopefully there is a solution that doesn't require me to know Sql stored procedures etc...

Any help appreciated!

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

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

发布评论

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

评论(1

别忘他 2024-10-13 06:39:38

查看 http://sourceforge.net/projects/itextsharp/ iText 的 ac# 端口用于 PDF 生成的开源 Java 库。使用这些库创建简单的 PDF 相对简单

Take a look at http://sourceforge.net/projects/itextsharp/ a c# port of the iText open source java library for PDF generation. It is relatively straightforward to create simple PDFs using these libraries

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