How to produce documents (docx or pdf) from SQL Server?

别等时光非礼了梦想. 提交于 2019-12-03 11:07:11

Office OpenXML is a nice and simple way of generating office files. XSLT's can be strong tool to format your content. This technology will not let you create pdf's.

Fast development without using any third party components will be difficult. But if you do consider using a report server, make sure to check out BIRT or Jasper.

To generate pdf's I have been using the deprecated Report.net. It has many ports to different languages and is still sufficient to make simple pdf's. Report.net on sourceforge

I dont think SQL Server itself can produce pdf files. What you can do is, as you mentioned, install an instance of SSRS and create a report that produces the information you need. Then you can create a subscription to deliver your report to where you want, when you want.

Here is an example of a simple subscription:

Go for SSRS only if you are OK with setting it up on a server and there is a definite need for schedule reporting and complex reports.

If you have code for manual PDF/docx generation, I would suggest to go ahead with it. Hopefully the complexity of its code is not a matter to you.

I have used both in separate scenarios. We used excel classes and objects from .NET for a minimal reporting from a web application.

But went for an elaborate reporting scheme for a system which required 1000s of reports to be generated in a scheduled manner and delivered to selected set of people.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!